Index: src/setup.c ================================================================== --- src/setup.c +++ src/setup.c @@ -307,11 +307,11 @@ int uid, i; int higherUser = 0; /* True if user being edited is SETUP and the */ /* user doing the editing is ADMIN. Disallow editing */ char *inherit[128]; int a[128]; - char *oa[128]; + const char *oa[128]; /* Must have ADMIN privileges to access this page */ login_check_credentials(); if( !g.perm.Admin ){ login_needed(); return; } @@ -441,38 +441,38 @@ if( fossil_strcmp(zLogin, "developer") ){ char *z1, *z2; z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='developer'"); while( z1 && *z1 ){ inherit[0x7f & *(z1++)] = - "D"; + "[D]"; } free(z2); } if( fossil_strcmp(zLogin, "reader") ){ char *z1, *z2; z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='reader'"); while( z1 && *z1 ){ inherit[0x7f & *(z1++)] = - "R"; + "[R]"; } free(z2); } if( fossil_strcmp(zLogin, "anonymous") ){ char *z1, *z2; z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='anonymous'"); while( z1 && *z1 ){ inherit[0x7f & *(z1++)] = - "A"; + "[A]"; } free(z2); } if( fossil_strcmp(zLogin, "nobody") ){ char *z1, *z2; z1 = z2 = db_text(0,"SELECT cap FROM user WHERE login='nobody'"); while( z1 && *z1 ){ inherit[0x7f & *(z1++)] = - "N"; + "[N]"; } free(z2); } /* Begin generating the page @@ -489,10 +489,47 @@ if( login_is_special(zLogin) ){ @ @ @ } + @ @
User ID: | if( uid ){ @%d(uid) | @@ -516,64 +553,96 @@ @Capabilities: | @
#define B(x) inherit[x]
@
|
@ User %h(zLogin) has Setup privileges and you only have Admin privileges Index: src/style.c ================================================================== --- src/style.c +++ src/style.c @@ -934,22 +934,26 @@ @ white-space: nowrap; }, { "span.ueditInheritNobody", "color for capabilities, inherited by nobody", @ color: green; + @ padding: .2em; }, { "span.ueditInheritDeveloper", "color for capabilities, inherited by developer", @ color: red; + @ padding: .2em; }, { "span.ueditInheritReader", "color for capabilities, inherited by reader", @ color: black; + @ padding: .2em; }, { "span.ueditInheritAnonymous", "color for capabilities, inherited by anonymous", @ color: blue; + @ padding: .2em; }, { "span.capability", "format for capabilities, mentioned on the user edit page", @ font-weight: bold; }, @@ -1191,10 +1195,14 @@ @ /* use default */ }, { "tr.row1", "odd table row color", @ /* Use default */ + }, + { "#usetupEditCapability", + "format for capabilities string, mentioned on the user edit page", + @ font-weight: bold; }, { "#canvas", "timeline graph node colors", @ color: black; @ background-color: white; },