Fossil SCM

Require wiki read permission in order to visit the /home URL.

drh 2008-11-20 23:15 trunk
Commit 19f5d0b15fc7b6109bf1c0daeb5ebe6ea37807f4
1 file changed +4 -2
+4 -2
--- src/wiki.c
+++ src/wiki.c
@@ -78,20 +78,22 @@
7878
** WEBPAGE: index
7979
** WEBPAGE: not_found
8080
*/
8181
void home_page(void){
8282
char *zPageName = db_get("project-name",0);
83
+ login_check_credentials();
84
+ if( !g.okRdWiki ){
85
+ cgi_redirect("/login?g=/home");
86
+ }
8387
if( zPageName ){
8488
login_check_credentials();
8589
g.zExtra = zPageName;
8690
cgi_set_parameter_nocopy("name", g.zExtra);
87
- g.okRdWiki = 1;
8891
g.argv[1] = "home";
8992
wiki_page();
9093
return;
9194
}
92
- login_check_credentials();
9395
style_header("Home");
9496
@ <p>This is a stub home-page for the project.
9597
@ To fill in this page, first go to
9698
@ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
9799
@ and establish a "Project Name". Then create a
98100
--- src/wiki.c
+++ src/wiki.c
@@ -78,20 +78,22 @@
78 ** WEBPAGE: index
79 ** WEBPAGE: not_found
80 */
81 void home_page(void){
82 char *zPageName = db_get("project-name",0);
 
 
 
 
83 if( zPageName ){
84 login_check_credentials();
85 g.zExtra = zPageName;
86 cgi_set_parameter_nocopy("name", g.zExtra);
87 g.okRdWiki = 1;
88 g.argv[1] = "home";
89 wiki_page();
90 return;
91 }
92 login_check_credentials();
93 style_header("Home");
94 @ <p>This is a stub home-page for the project.
95 @ To fill in this page, first go to
96 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
97 @ and establish a "Project Name". Then create a
98
--- src/wiki.c
+++ src/wiki.c
@@ -78,20 +78,22 @@
78 ** WEBPAGE: index
79 ** WEBPAGE: not_found
80 */
81 void home_page(void){
82 char *zPageName = db_get("project-name",0);
83 login_check_credentials();
84 if( !g.okRdWiki ){
85 cgi_redirect("/login?g=/home");
86 }
87 if( zPageName ){
88 login_check_credentials();
89 g.zExtra = zPageName;
90 cgi_set_parameter_nocopy("name", g.zExtra);
 
91 g.argv[1] = "home";
92 wiki_page();
93 return;
94 }
 
95 style_header("Home");
96 @ <p>This is a stub home-page for the project.
97 @ To fill in this page, first go to
98 @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a>
99 @ and establish a "Project Name". Then create a
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button