Fossil SCM

Removed an old (#if 0)'d-out block - the permissions check it was blocking out is performed further down in the function.

stephan 2019-07-26 06:14 trunk
Commit 7bd4bca2f4b6bdb17e6b402e127cc3598af43cb408cd0fe4560d006ae860a1a8
1 file changed -7
--- src/json_user.c
+++ src/json_user.c
@@ -186,17 +186,10 @@
186186
char const tgtHasSetup = zCap && (NULL!=strchr(zCap, 's'));
187187
char tgtHadSetup = 0;
188188
Blob sql = empty_blob;
189189
Stmt q = empty_Stmt;
190190
191
-#if 0
192
- if(!g.perm.Admin && !g.perm.Setup && !g.perm.Password){
193
- return json_set_err( FSL_JSON_E_DENIED,
194
- "Password change requires 'a', 's', "
195
- "or 'p' permissions.");
196
- }
197
-#endif
198191
if(uid<=0 && (!zName||!*zName)){
199192
return json_set_err(FSL_JSON_E_MISSING_ARGS,
200193
"One of 'uid' or 'name' is required.");
201194
}else if(uid>0){
202195
zNameFree = db_text(NULL, "SELECT login FROM user WHERE uid=%d",uid);
203196
--- src/json_user.c
+++ src/json_user.c
@@ -186,17 +186,10 @@
186 char const tgtHasSetup = zCap && (NULL!=strchr(zCap, 's'));
187 char tgtHadSetup = 0;
188 Blob sql = empty_blob;
189 Stmt q = empty_Stmt;
190
191 #if 0
192 if(!g.perm.Admin && !g.perm.Setup && !g.perm.Password){
193 return json_set_err( FSL_JSON_E_DENIED,
194 "Password change requires 'a', 's', "
195 "or 'p' permissions.");
196 }
197 #endif
198 if(uid<=0 && (!zName||!*zName)){
199 return json_set_err(FSL_JSON_E_MISSING_ARGS,
200 "One of 'uid' or 'name' is required.");
201 }else if(uid>0){
202 zNameFree = db_text(NULL, "SELECT login FROM user WHERE uid=%d",uid);
203
--- src/json_user.c
+++ src/json_user.c
@@ -186,17 +186,10 @@
186 char const tgtHasSetup = zCap && (NULL!=strchr(zCap, 's'));
187 char tgtHadSetup = 0;
188 Blob sql = empty_blob;
189 Stmt q = empty_Stmt;
190
 
 
 
 
 
 
 
191 if(uid<=0 && (!zName||!*zName)){
192 return json_set_err(FSL_JSON_E_MISSING_ARGS,
193 "One of 'uid' or 'name' is required.");
194 }else if(uid>0){
195 zNameFree = db_text(NULL, "SELECT login FROM user WHERE uid=%d",uid);
196

Keyboard Shortcuts

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