Fossil SCM
Removed an old (#if 0)'d-out block - the permissions check it was blocking out is performed further down in the function.
Commit
7bd4bca2f4b6bdb17e6b402e127cc3598af43cb408cd0fe4560d006ae860a1a8
Parent
9ca4eb2bda6843b…
1 file changed
-7
-7
| --- src/json_user.c | ||
| +++ src/json_user.c | ||
| @@ -186,17 +186,10 @@ | ||
| 186 | 186 | char const tgtHasSetup = zCap && (NULL!=strchr(zCap, 's')); |
| 187 | 187 | char tgtHadSetup = 0; |
| 188 | 188 | Blob sql = empty_blob; |
| 189 | 189 | Stmt q = empty_Stmt; |
| 190 | 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 | 191 | if(uid<=0 && (!zName||!*zName)){ |
| 199 | 192 | return json_set_err(FSL_JSON_E_MISSING_ARGS, |
| 200 | 193 | "One of 'uid' or 'name' is required."); |
| 201 | 194 | }else if(uid>0){ |
| 202 | 195 | zNameFree = db_text(NULL, "SELECT login FROM user WHERE uid=%d",uid); |
| 203 | 196 |
| --- 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 |