Fossil SCM

Allow the Admin user to modify the skin.

drh 2018-11-30 13:07 trunk merge
Commit 257318c1ca85c19131543e0d334ab56d4b8b76456d860a65efc63f11cabb6a7a
2 files changed +6 -8 +1 -1
+6 -8
--- src/setup.c
+++ src/setup.c
@@ -135,22 +135,20 @@
135135
setup_menu_entry("Skins", "setup_skin",
136136
"Select and/or modify the web interface \"skins\"");
137137
setup_menu_entry("Moderation", "setup_modreq",
138138
"Enable/Disable requiring moderator approval of Wiki and/or Ticket"
139139
" 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");
144142
setup_menu_entry("URLs & Checkouts", "urllist",
145143
"Show URLs used to access this repo and known check-outs");
146144
if( setup_user ){
147145
setup_menu_entry("Web-Cache", "cachestat",
148146
"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");
151147
}
148
+ setup_menu_entry("Logo", "setup_logo",
149
+ "Change the logo and background images for the server");
152150
setup_menu_entry("Shunned", "shun",
153151
"Show artifacts that are shunned by this repository");
154152
setup_menu_entry("Artifact Receipts Log", "rcvfromlist",
155153
"A record of received artifacts and their sources");
156154
setup_menu_entry("User Log", "access_log",
@@ -999,11 +997,11 @@
999997
** Administrative page for configuring and controlling ad units
1000998
** and how they are displayed.
1001999
*/
10021000
void setup_adunit(void){
10031001
login_check_credentials();
1004
- if( !g.perm.Setup ){
1002
+ if( !g.perm.Admin ){
10051003
login_needed(0);
10061004
return;
10071005
}
10081006
db_begin_transaction();
10091007
if( P("clear")!=0 && cgi_csrf_safe(1) ){
@@ -1089,11 +1087,11 @@
10891087
}
10901088
if( szBgImg>0 ){
10911089
zBgMime = PD("bgim:mimetype","image/gif");
10921090
}
10931091
login_check_credentials();
1094
- if( !g.perm.Setup ){
1092
+ if( !g.perm.Admin ){
10951093
login_needed(0);
10961094
return;
10971095
}
10981096
db_begin_transaction();
10991097
if( !cgi_csrf_safe(1) ){
11001098
--- 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 @@
903903
if( !login_is_individual() ){
904904
login_needed(0);
905905
return;
906906
}
907907
zAllowedEditors = db_get_mprintf("", "draft%d-users", iSkin);
908
- if( g.perm.Setup ){
908
+ if( g.perm.Admin ){
909909
isSetup = isEditor = 1;
910910
}else{
911911
Glob *pAllowedEditors;
912912
isSetup = isEditor = 0;
913913
if( zAllowedEditors[0] ){
914914
--- 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

Keyboard Shortcuts

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