Fossil SCM
/json/timeline/ci and /json/artifact/CHECKIN now require h access instead of o (this is debatable).
Commit
4d027477fa71b4636cee8309e0d47e5ef12961a0
Parent
d2c5b943f3d7ed2…
2 files changed
+1
-1
+4
-4
+1
-1
| --- src/json_artifact.c | ||
| +++ src/json_artifact.c | ||
| @@ -207,11 +207,11 @@ | ||
| 207 | 207 | /* |
| 208 | 208 | ** Sub-impl of /json/artifact for checkins. |
| 209 | 209 | */ |
| 210 | 210 | static cson_value * json_artifact_ci( int rid ){ |
| 211 | 211 | if(! g.perm.History ){ |
| 212 | - g.json.resultCode = FSL_JSON_E_DENIED; | |
| 212 | + json_set_err( FSL_JSON_E_DENIED, "Viewing checkins requires 'h' access." ); | |
| 213 | 213 | return NULL; |
| 214 | 214 | }else{ |
| 215 | 215 | return json_artifact_for_ci(rid, 1); |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -207,11 +207,11 @@ | |
| 207 | /* |
| 208 | ** Sub-impl of /json/artifact for checkins. |
| 209 | */ |
| 210 | static cson_value * json_artifact_ci( int rid ){ |
| 211 | if(! g.perm.History ){ |
| 212 | g.json.resultCode = FSL_JSON_E_DENIED; |
| 213 | return NULL; |
| 214 | }else{ |
| 215 | return json_artifact_for_ci(rid, 1); |
| 216 | } |
| 217 | } |
| 218 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -207,11 +207,11 @@ | |
| 207 | /* |
| 208 | ** Sub-impl of /json/artifact for checkins. |
| 209 | */ |
| 210 | static cson_value * json_artifact_ci( int rid ){ |
| 211 | if(! g.perm.History ){ |
| 212 | json_set_err( FSL_JSON_E_DENIED, "Viewing checkins requires 'h' access." ); |
| 213 | return NULL; |
| 214 | }else{ |
| 215 | return json_artifact_for_ci(rid, 1); |
| 216 | } |
| 217 | } |
| 218 |
+4
-4
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -426,15 +426,15 @@ | ||
| 426 | 426 | int check = 0; |
| 427 | 427 | char showFiles = -1/*magic number*/; |
| 428 | 428 | Stmt q = empty_Stmt; |
| 429 | 429 | char warnRowToJsonFailed = 0; |
| 430 | 430 | Blob sql = empty_blob; |
| 431 | - if( !g.perm.Read ){ | |
| 432 | - /* IMO this falls more under the category of g.perm.History, but | |
| 433 | - i'm following the original timeline impl here. | |
| 431 | + if( !g.perm.History ){ | |
| 432 | + /* Reminder to self: HTML impl requires 'o' (Read) | |
| 433 | + rights. | |
| 434 | 434 | */ |
| 435 | - json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'o' access." ); | |
| 435 | + json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); | |
| 436 | 436 | return NULL; |
| 437 | 437 | } |
| 438 | 438 | showFiles = json_find_option_bool("files",NULL,"f",0); |
| 439 | 439 | payV = cson_value_new_object(); |
| 440 | 440 | pay = cson_value_get_object(payV); |
| 441 | 441 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,15 +426,15 @@ | |
| 426 | int check = 0; |
| 427 | char showFiles = -1/*magic number*/; |
| 428 | Stmt q = empty_Stmt; |
| 429 | char warnRowToJsonFailed = 0; |
| 430 | Blob sql = empty_blob; |
| 431 | if( !g.perm.Read ){ |
| 432 | /* IMO this falls more under the category of g.perm.History, but |
| 433 | i'm following the original timeline impl here. |
| 434 | */ |
| 435 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'o' access." ); |
| 436 | return NULL; |
| 437 | } |
| 438 | showFiles = json_find_option_bool("files",NULL,"f",0); |
| 439 | payV = cson_value_new_object(); |
| 440 | pay = cson_value_get_object(payV); |
| 441 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -426,15 +426,15 @@ | |
| 426 | int check = 0; |
| 427 | char showFiles = -1/*magic number*/; |
| 428 | Stmt q = empty_Stmt; |
| 429 | char warnRowToJsonFailed = 0; |
| 430 | Blob sql = empty_blob; |
| 431 | if( !g.perm.History ){ |
| 432 | /* Reminder to self: HTML impl requires 'o' (Read) |
| 433 | rights. |
| 434 | */ |
| 435 | json_set_err( FSL_JSON_E_DENIED, "Checkin timeline requires 'h' access." ); |
| 436 | return NULL; |
| 437 | } |
| 438 | showFiles = json_find_option_bool("files",NULL,"f",0); |
| 439 | payV = cson_value_new_object(); |
| 440 | pay = cson_value_get_object(payV); |
| 441 |