Fossil SCM
The admin can see private artifacts in /bloblist even if they do not have the Private ('x') permission.
Commit
648bc30531a76ff8fc85c4a8775ad4bd95251e984c73037bd34409d2620e64d9
Parent
7b6b567155e4ec3…
1 file changed
+2
-2
+2
-2
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -1201,11 +1201,11 @@ | ||
| 1201 | 1201 | } |
| 1202 | 1202 | }else{ |
| 1203 | 1203 | privOnly = 0; |
| 1204 | 1204 | phantomOnly = 0; |
| 1205 | 1205 | } |
| 1206 | - if( g.perm.Private ){ | |
| 1206 | + if( g.perm.Private || g.perm.Admin ){ | |
| 1207 | 1207 | if( !privOnly ){ |
| 1208 | 1208 | style_submenu_element("Private", "bloblist?priv"); |
| 1209 | 1209 | } |
| 1210 | 1210 | }else{ |
| 1211 | 1211 | privOnly = 0; |
| @@ -1257,11 +1257,11 @@ | ||
| 1257 | 1257 | int isPhantom = db_column_int(&q,4); |
| 1258 | 1258 | if( isPhantom && !g.perm.Admin ){ |
| 1259 | 1259 | /* Do not show phantom artifacts to non-admin users */ |
| 1260 | 1260 | continue; |
| 1261 | 1261 | } |
| 1262 | - if( isPriv && !g.perm.Private ){ | |
| 1262 | + if( isPriv && !g.perm.Private && !g.perm.Admin ){ | |
| 1263 | 1263 | /* Don't show private artifacts to users without Private (x) permission */ |
| 1264 | 1264 | continue; |
| 1265 | 1265 | } |
| 1266 | 1266 | if( hashClr ){ |
| 1267 | 1267 | const char *zClr = db_column_bytes(&q,1)>40 ? zSha3Bg : zSha1Bg; |
| 1268 | 1268 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1201,11 +1201,11 @@ | |
| 1201 | } |
| 1202 | }else{ |
| 1203 | privOnly = 0; |
| 1204 | phantomOnly = 0; |
| 1205 | } |
| 1206 | if( g.perm.Private ){ |
| 1207 | if( !privOnly ){ |
| 1208 | style_submenu_element("Private", "bloblist?priv"); |
| 1209 | } |
| 1210 | }else{ |
| 1211 | privOnly = 0; |
| @@ -1257,11 +1257,11 @@ | |
| 1257 | int isPhantom = db_column_int(&q,4); |
| 1258 | if( isPhantom && !g.perm.Admin ){ |
| 1259 | /* Do not show phantom artifacts to non-admin users */ |
| 1260 | continue; |
| 1261 | } |
| 1262 | if( isPriv && !g.perm.Private ){ |
| 1263 | /* Don't show private artifacts to users without Private (x) permission */ |
| 1264 | continue; |
| 1265 | } |
| 1266 | if( hashClr ){ |
| 1267 | const char *zClr = db_column_bytes(&q,1)>40 ? zSha3Bg : zSha1Bg; |
| 1268 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1201,11 +1201,11 @@ | |
| 1201 | } |
| 1202 | }else{ |
| 1203 | privOnly = 0; |
| 1204 | phantomOnly = 0; |
| 1205 | } |
| 1206 | if( g.perm.Private || g.perm.Admin ){ |
| 1207 | if( !privOnly ){ |
| 1208 | style_submenu_element("Private", "bloblist?priv"); |
| 1209 | } |
| 1210 | }else{ |
| 1211 | privOnly = 0; |
| @@ -1257,11 +1257,11 @@ | |
| 1257 | int isPhantom = db_column_int(&q,4); |
| 1258 | if( isPhantom && !g.perm.Admin ){ |
| 1259 | /* Do not show phantom artifacts to non-admin users */ |
| 1260 | continue; |
| 1261 | } |
| 1262 | if( isPriv && !g.perm.Private && !g.perm.Admin ){ |
| 1263 | /* Don't show private artifacts to users without Private (x) permission */ |
| 1264 | continue; |
| 1265 | } |
| 1266 | if( hashClr ){ |
| 1267 | const char *zClr = db_column_bytes(&q,1)>40 ? zSha3Bg : zSha1Bg; |
| 1268 |