Fossil SCM
Require wiki read permission in order to visit the /home URL.
Commit
19f5d0b15fc7b6109bf1c0daeb5ebe6ea37807f4
Parent
f8835f73655fa41…
1 file changed
+4
-2
+4
-2
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -78,20 +78,22 @@ | ||
| 78 | 78 | ** WEBPAGE: index |
| 79 | 79 | ** WEBPAGE: not_found |
| 80 | 80 | */ |
| 81 | 81 | void home_page(void){ |
| 82 | 82 | char *zPageName = db_get("project-name",0); |
| 83 | + login_check_credentials(); | |
| 84 | + if( !g.okRdWiki ){ | |
| 85 | + cgi_redirect("/login?g=/home"); | |
| 86 | + } | |
| 83 | 87 | if( zPageName ){ |
| 84 | 88 | login_check_credentials(); |
| 85 | 89 | g.zExtra = zPageName; |
| 86 | 90 | cgi_set_parameter_nocopy("name", g.zExtra); |
| 87 | - g.okRdWiki = 1; | |
| 88 | 91 | g.argv[1] = "home"; |
| 89 | 92 | wiki_page(); |
| 90 | 93 | return; |
| 91 | 94 | } |
| 92 | - login_check_credentials(); | |
| 93 | 95 | style_header("Home"); |
| 94 | 96 | @ <p>This is a stub home-page for the project. |
| 95 | 97 | @ To fill in this page, first go to |
| 96 | 98 | @ <a href="%s(g.zBaseURL)/setup_config">setup/config</a> |
| 97 | 99 | @ and establish a "Project Name". Then create a |
| 98 | 100 |
| --- 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 |