Fossil SCM

Fix the computation of capabilities in the "Capability Summary" report so that it ignores the special users "nobody", "anonymous", "reader", and "developer".

drh 2019-04-23 13:50 trunk
Commit 63febeb7f4229aff7918a92ca9d374472d195e8952ce06b4373512bb01918327
1 file changed +1 -1
--- src/capabilities.c
+++ src/capabilities.c
@@ -364,11 +364,11 @@
364364
" FROM t LEFT JOIN user ON t.id=user.login"
365365
" UNION ALL"
366366
" SELECT 'New User Default', fullcap(%Q), 10, 1"
367367
" UNION ALL"
368368
" SELECT 'Regular User', fullcap(capunion(cap)), 20, count(*) FROM user"
369
- " WHERE cap NOT GLOB '*[as]*'"
369
+ " WHERE cap NOT GLOB '*[as]*' AND login NOT IN (SELECT id FROM t)"
370370
" UNION ALL"
371371
" SELECT 'Adminstrator', fullcap(capunion(cap)), 30, count(*) FROM user"
372372
" WHERE cap GLOB '*[as]*'"
373373
" ORDER BY 3 ASC",
374374
db_get("default-perms","")
375375
--- src/capabilities.c
+++ src/capabilities.c
@@ -364,11 +364,11 @@
364 " FROM t LEFT JOIN user ON t.id=user.login"
365 " UNION ALL"
366 " SELECT 'New User Default', fullcap(%Q), 10, 1"
367 " UNION ALL"
368 " SELECT 'Regular User', fullcap(capunion(cap)), 20, count(*) FROM user"
369 " WHERE cap NOT GLOB '*[as]*'"
370 " UNION ALL"
371 " SELECT 'Adminstrator', fullcap(capunion(cap)), 30, count(*) FROM user"
372 " WHERE cap GLOB '*[as]*'"
373 " ORDER BY 3 ASC",
374 db_get("default-perms","")
375
--- src/capabilities.c
+++ src/capabilities.c
@@ -364,11 +364,11 @@
364 " FROM t LEFT JOIN user ON t.id=user.login"
365 " UNION ALL"
366 " SELECT 'New User Default', fullcap(%Q), 10, 1"
367 " UNION ALL"
368 " SELECT 'Regular User', fullcap(capunion(cap)), 20, count(*) FROM user"
369 " WHERE cap NOT GLOB '*[as]*' AND login NOT IN (SELECT id FROM t)"
370 " UNION ALL"
371 " SELECT 'Adminstrator', fullcap(capunion(cap)), 30, count(*) FROM user"
372 " WHERE cap GLOB '*[as]*'"
373 " ORDER BY 3 ASC",
374 db_get("default-perms","")
375

Keyboard Shortcuts

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