Fossil SCM
Allow the Admin user to modify the skin.
Commit
257318c1ca85c19131543e0d334ab56d4b8b76456d860a65efc63f11cabb6a7a
Parent
4675fc70ba3b975…
2 files changed
+6
-8
+1
-1
+6
-8
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -135,22 +135,20 @@ | ||
| 135 | 135 | setup_menu_entry("Skins", "setup_skin", |
| 136 | 136 | "Select and/or modify the web interface \"skins\""); |
| 137 | 137 | setup_menu_entry("Moderation", "setup_modreq", |
| 138 | 138 | "Enable/Disable requiring moderator approval of Wiki and/or Ticket" |
| 139 | 139 | " changes and attachments."); |
| 140 | - if( setup_user ){ | |
| 141 | - setup_menu_entry("Ad-Unit", "setup_adunit", | |
| 142 | - "Edit HTML text for an ad unit inserted after the menu bar"); | |
| 143 | - } | |
| 140 | + setup_menu_entry("Ad-Unit", "setup_adunit", | |
| 141 | + "Edit HTML text for an ad unit inserted after the menu bar"); | |
| 144 | 142 | setup_menu_entry("URLs & Checkouts", "urllist", |
| 145 | 143 | "Show URLs used to access this repo and known check-outs"); |
| 146 | 144 | if( setup_user ){ |
| 147 | 145 | setup_menu_entry("Web-Cache", "cachestat", |
| 148 | 146 | "View the status of the expensive-page cache"); |
| 149 | - setup_menu_entry("Logo", "setup_logo", | |
| 150 | - "Change the logo and background images for the server"); | |
| 151 | 147 | } |
| 148 | + setup_menu_entry("Logo", "setup_logo", | |
| 149 | + "Change the logo and background images for the server"); | |
| 152 | 150 | setup_menu_entry("Shunned", "shun", |
| 153 | 151 | "Show artifacts that are shunned by this repository"); |
| 154 | 152 | setup_menu_entry("Artifact Receipts Log", "rcvfromlist", |
| 155 | 153 | "A record of received artifacts and their sources"); |
| 156 | 154 | setup_menu_entry("User Log", "access_log", |
| @@ -999,11 +997,11 @@ | ||
| 999 | 997 | ** Administrative page for configuring and controlling ad units |
| 1000 | 998 | ** and how they are displayed. |
| 1001 | 999 | */ |
| 1002 | 1000 | void setup_adunit(void){ |
| 1003 | 1001 | login_check_credentials(); |
| 1004 | - if( !g.perm.Setup ){ | |
| 1002 | + if( !g.perm.Admin ){ | |
| 1005 | 1003 | login_needed(0); |
| 1006 | 1004 | return; |
| 1007 | 1005 | } |
| 1008 | 1006 | db_begin_transaction(); |
| 1009 | 1007 | if( P("clear")!=0 && cgi_csrf_safe(1) ){ |
| @@ -1089,11 +1087,11 @@ | ||
| 1089 | 1087 | } |
| 1090 | 1088 | if( szBgImg>0 ){ |
| 1091 | 1089 | zBgMime = PD("bgim:mimetype","image/gif"); |
| 1092 | 1090 | } |
| 1093 | 1091 | login_check_credentials(); |
| 1094 | - if( !g.perm.Setup ){ | |
| 1092 | + if( !g.perm.Admin ){ | |
| 1095 | 1093 | login_needed(0); |
| 1096 | 1094 | return; |
| 1097 | 1095 | } |
| 1098 | 1096 | db_begin_transaction(); |
| 1099 | 1097 | if( !cgi_csrf_safe(1) ){ |
| 1100 | 1098 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -135,22 +135,20 @@ | |
| 135 | setup_menu_entry("Skins", "setup_skin", |
| 136 | "Select and/or modify the web interface \"skins\""); |
| 137 | setup_menu_entry("Moderation", "setup_modreq", |
| 138 | "Enable/Disable requiring moderator approval of Wiki and/or Ticket" |
| 139 | " changes and attachments."); |
| 140 | if( setup_user ){ |
| 141 | setup_menu_entry("Ad-Unit", "setup_adunit", |
| 142 | "Edit HTML text for an ad unit inserted after the menu bar"); |
| 143 | } |
| 144 | setup_menu_entry("URLs & Checkouts", "urllist", |
| 145 | "Show URLs used to access this repo and known check-outs"); |
| 146 | if( setup_user ){ |
| 147 | setup_menu_entry("Web-Cache", "cachestat", |
| 148 | "View the status of the expensive-page cache"); |
| 149 | setup_menu_entry("Logo", "setup_logo", |
| 150 | "Change the logo and background images for the server"); |
| 151 | } |
| 152 | setup_menu_entry("Shunned", "shun", |
| 153 | "Show artifacts that are shunned by this repository"); |
| 154 | setup_menu_entry("Artifact Receipts Log", "rcvfromlist", |
| 155 | "A record of received artifacts and their sources"); |
| 156 | setup_menu_entry("User Log", "access_log", |
| @@ -999,11 +997,11 @@ | |
| 999 | ** Administrative page for configuring and controlling ad units |
| 1000 | ** and how they are displayed. |
| 1001 | */ |
| 1002 | void setup_adunit(void){ |
| 1003 | login_check_credentials(); |
| 1004 | if( !g.perm.Setup ){ |
| 1005 | login_needed(0); |
| 1006 | return; |
| 1007 | } |
| 1008 | db_begin_transaction(); |
| 1009 | if( P("clear")!=0 && cgi_csrf_safe(1) ){ |
| @@ -1089,11 +1087,11 @@ | |
| 1089 | } |
| 1090 | if( szBgImg>0 ){ |
| 1091 | zBgMime = PD("bgim:mimetype","image/gif"); |
| 1092 | } |
| 1093 | login_check_credentials(); |
| 1094 | if( !g.perm.Setup ){ |
| 1095 | login_needed(0); |
| 1096 | return; |
| 1097 | } |
| 1098 | db_begin_transaction(); |
| 1099 | if( !cgi_csrf_safe(1) ){ |
| 1100 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -135,22 +135,20 @@ | |
| 135 | setup_menu_entry("Skins", "setup_skin", |
| 136 | "Select and/or modify the web interface \"skins\""); |
| 137 | setup_menu_entry("Moderation", "setup_modreq", |
| 138 | "Enable/Disable requiring moderator approval of Wiki and/or Ticket" |
| 139 | " changes and attachments."); |
| 140 | setup_menu_entry("Ad-Unit", "setup_adunit", |
| 141 | "Edit HTML text for an ad unit inserted after the menu bar"); |
| 142 | setup_menu_entry("URLs & Checkouts", "urllist", |
| 143 | "Show URLs used to access this repo and known check-outs"); |
| 144 | if( setup_user ){ |
| 145 | setup_menu_entry("Web-Cache", "cachestat", |
| 146 | "View the status of the expensive-page cache"); |
| 147 | } |
| 148 | setup_menu_entry("Logo", "setup_logo", |
| 149 | "Change the logo and background images for the server"); |
| 150 | setup_menu_entry("Shunned", "shun", |
| 151 | "Show artifacts that are shunned by this repository"); |
| 152 | setup_menu_entry("Artifact Receipts Log", "rcvfromlist", |
| 153 | "A record of received artifacts and their sources"); |
| 154 | setup_menu_entry("User Log", "access_log", |
| @@ -999,11 +997,11 @@ | |
| 997 | ** Administrative page for configuring and controlling ad units |
| 998 | ** and how they are displayed. |
| 999 | */ |
| 1000 | void setup_adunit(void){ |
| 1001 | login_check_credentials(); |
| 1002 | if( !g.perm.Admin ){ |
| 1003 | login_needed(0); |
| 1004 | return; |
| 1005 | } |
| 1006 | db_begin_transaction(); |
| 1007 | if( P("clear")!=0 && cgi_csrf_safe(1) ){ |
| @@ -1089,11 +1087,11 @@ | |
| 1087 | } |
| 1088 | if( szBgImg>0 ){ |
| 1089 | zBgMime = PD("bgim:mimetype","image/gif"); |
| 1090 | } |
| 1091 | login_check_credentials(); |
| 1092 | if( !g.perm.Admin ){ |
| 1093 | login_needed(0); |
| 1094 | return; |
| 1095 | } |
| 1096 | db_begin_transaction(); |
| 1097 | if( !cgi_csrf_safe(1) ){ |
| 1098 |
+1
-1
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -903,11 +903,11 @@ | ||
| 903 | 903 | if( !login_is_individual() ){ |
| 904 | 904 | login_needed(0); |
| 905 | 905 | return; |
| 906 | 906 | } |
| 907 | 907 | zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin); |
| 908 | - if( g.perm.Setup ){ | |
| 908 | + if( g.perm.Admin ){ | |
| 909 | 909 | isSetup = isEditor = 1; |
| 910 | 910 | }else{ |
| 911 | 911 | Glob *pAllowedEditors; |
| 912 | 912 | isSetup = isEditor = 0; |
| 913 | 913 | if( zAllowedEditors[0] ){ |
| 914 | 914 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -903,11 +903,11 @@ | |
| 903 | if( !login_is_individual() ){ |
| 904 | login_needed(0); |
| 905 | return; |
| 906 | } |
| 907 | zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin); |
| 908 | if( g.perm.Setup ){ |
| 909 | isSetup = isEditor = 1; |
| 910 | }else{ |
| 911 | Glob *pAllowedEditors; |
| 912 | isSetup = isEditor = 0; |
| 913 | if( zAllowedEditors[0] ){ |
| 914 |
| --- src/skins.c | |
| +++ src/skins.c | |
| @@ -903,11 +903,11 @@ | |
| 903 | if( !login_is_individual() ){ |
| 904 | login_needed(0); |
| 905 | return; |
| 906 | } |
| 907 | zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin); |
| 908 | if( g.perm.Admin ){ |
| 909 | isSetup = isEditor = 1; |
| 910 | }else{ |
| 911 | Glob *pAllowedEditors; |
| 912 | isSetup = isEditor = 0; |
| 913 | if( zAllowedEditors[0] ){ |
| 914 |