Fossil SCM

The admin can see private artifacts in /bloblist even if they do not have the Private ('x') permission.

drh 2020-04-12 23:29 trunk
Commit 648bc30531a76ff8fc85c4a8775ad4bd95251e984c73037bd34409d2620e64d9
1 file changed +2 -2
+2 -2
--- src/name.c
+++ src/name.c
@@ -1201,11 +1201,11 @@
12011201
}
12021202
}else{
12031203
privOnly = 0;
12041204
phantomOnly = 0;
12051205
}
1206
- if( g.perm.Private ){
1206
+ if( g.perm.Private || g.perm.Admin ){
12071207
if( !privOnly ){
12081208
style_submenu_element("Private", "bloblist?priv");
12091209
}
12101210
}else{
12111211
privOnly = 0;
@@ -1257,11 +1257,11 @@
12571257
int isPhantom = db_column_int(&q,4);
12581258
if( isPhantom && !g.perm.Admin ){
12591259
/* Do not show phantom artifacts to non-admin users */
12601260
continue;
12611261
}
1262
- if( isPriv && !g.perm.Private ){
1262
+ if( isPriv && !g.perm.Private && !g.perm.Admin ){
12631263
/* Don't show private artifacts to users without Private (x) permission */
12641264
continue;
12651265
}
12661266
if( hashClr ){
12671267
const char *zClr = db_column_bytes(&q,1)>40 ? zSha3Bg : zSha1Bg;
12681268
--- 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

Keyboard Shortcuts

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