Fossil SCM

/json/timeline/ci and /json/artifact/CHECKIN now require h access instead of o (this is debatable).

stephan 2012-03-02 15:01 trunk
Commit 4d027477fa71b4636cee8309e0d47e5ef12961a0
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -207,11 +207,11 @@
207207
/*
208208
** Sub-impl of /json/artifact for checkins.
209209
*/
210210
static cson_value * json_artifact_ci( int rid ){
211211
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." );
213213
return NULL;
214214
}else{
215215
return json_artifact_for_ci(rid, 1);
216216
}
217217
}
218218
--- 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
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -426,15 +426,15 @@
426426
int check = 0;
427427
char showFiles = -1/*magic number*/;
428428
Stmt q = empty_Stmt;
429429
char warnRowToJsonFailed = 0;
430430
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.
434434
*/
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." );
436436
return NULL;
437437
}
438438
showFiles = json_find_option_bool("files",NULL,"f",0);
439439
payV = cson_value_new_object();
440440
pay = cson_value_get_object(payV);
441441
--- 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

Keyboard Shortcuts

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