Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Improvements to the capability listing page: /setup_ucap_list |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8689cf8b834bb3e9ae8139b8215fc8c8 |
User & Date: | drh 2018-08-29 12:57:00.343 |
Context
2018-08-30
| ||
14:03 | Update the built-in SQLite to the latest 3.25.0 alpha version, for testing. ... (check-in: 57e80ad2 user: drh tags: trunk) | |
2018-08-29
| ||
12:57 | Improvements to the capability listing page: /setup_ucap_list ... (check-in: 8689cf8b user: drh tags: trunk) | |
11:17 | Updates to the "How The Download Page Works" document. ... (check-in: 498cfbf7 user: drh tags: trunk) | |
Changes
Changes to src/capabilities.c.
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 | if( zIn==0 ) zIn = ""; p = capability_add(0, zIn); capability_expand(p); zOut = capability_string(p); sqlite3_result_text(context, zOut, -1, fossil_free); capability_free(p); } /* ** Generate HTML that lists all of the capability letters together with ** a brief summary of what each letter means. */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > | | | < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | if( zIn==0 ) zIn = ""; p = capability_add(0, zIn); capability_expand(p); zOut = capability_string(p); sqlite3_result_text(context, zOut, -1, fossil_free); capability_free(p); } #if INTERFACE /* ** Capabilities are grouped into "classes" as follows: */ #define CAPCLASS_CODE 0x0001 #define CAPCLASS_WIKI 0x0002 #define CAPCLASS_TKT 0x0004 #define CAPCLASS_FORUM 0x0008 #define CAPCLASS_DATA 0x0010 #define CAPCLASS_ALERT 0x0020 #define CAPCLASS_OTHER 0x0040 #define CAPCLASS_SUPER 0x0080 #define CAPCLASS_ALL 0xffff #endif /* INTERFACE */ /* ** The following structure holds descriptions of the various capabilities. */ static struct Caps { char cCap; /* The capability letter */ unsigned short eClass; /* The "class" for this capability */ char *zAbbrev; /* Abbreviated mnemonic name */ char *zOneLiner; /* One-line summary */ } aCap[] = { { 'a', CAPCLASS_SUPER, "Admin", "Create and delete users" }, { 'b', CAPCLASS_WIKI|CAPCLASS_TKT, "Attach", "Add attchments to wiki or tickets" }, { 'c', CAPCLASS_TKT, "Append-Tkt", "Append to existing tickets" }, { 'd', CAPCLASS_WIKI|CAPCLASS_TKT, "Delete", "Delete wiki or tickets" }, { 'e', CAPCLASS_DATA, "View-PII", "View sensitive info such as email addresses" }, { 'f', CAPCLASS_WIKI, "New-Wiki", "Create new wiki pages" }, { 'g', CAPCLASS_DATA, "Clone", "Clone the repository" }, { 'h', CAPCLASS_OTHER, "Hyperlinks", "Show hyperlinks to detailed repository history" }, { 'i', CAPCLASS_CODE, "Check-In", "Check-in code changes" }, { 'j', CAPCLASS_WIKI, "Read-Wiki", "View wiki pages" }, { 'k', CAPCLASS_WIKI, "Write-Wiki", "Edit wiki pages" }, { 'l', CAPCLASS_WIKI|CAPCLASS_SUPER, "Mod-Wiki", "Moderator for wiki pages" }, { 'm', CAPCLASS_WIKI, "Append-Wiki", "Append to wiki pages" }, { 'n', CAPCLASS_TKT, "New-Tkt", "Create new tickets" }, { 'o', CAPCLASS_CODE, "Check-Out", "Check out code" }, { 'p', CAPCLASS_OTHER, "Password", "Change your own password" }, { 'q', CAPCLASS_TKT|CAPCLASS_SUPER, "Mod-Tkt", "Moderate tickets" }, { 'r', CAPCLASS_TKT, "Read-Tkt", "View tickets" }, { 's', CAPCLASS_SUPER, "Superuser", "Setup and configure the respository" }, { 't', CAPCLASS_TKT, "Reports", "Create new ticket report formats" }, { 'u', CAPCLASS_OTHER, "Reader", "Inherit all the capabilities of the \"reader\" user" }, { 'v', CAPCLASS_OTHER, "Developer", "Inherit all capabilities of the \"developer\" user" }, { 'w', CAPCLASS_TKT, "Write-Tkt", "Edit tickets" }, { 'x', CAPCLASS_DATA, "Private", "Push and/or pull private branches" }, { 'y', CAPCLASS_SUPER, "Write-UV", "Push unversioned content" }, { 'z', CAPCLASS_CODE, "Zip-Download", "Download a ZIP archive, tarball, or SQL archive" }, { '2', CAPCLASS_FORUM, "Forum-Read", "Read forum posts by others" }, { '3', CAPCLASS_FORUM, "Forum-Write", "Create new forum messages" }, { '4', CAPCLASS_FORUM, "Forum-Trusted", "Create forum messages that bypass moderation" }, { '5', CAPCLASS_FORUM|CAPCLASS_SUPER, "Forum-Mod", "Moderator for forum messages" }, { '6', CAPCLASS_FORUM|CAPCLASS_SUPER, "Forum-Admin", "Set or remove capability '4' from other users" }, { '7', CAPCLASS_ALERT, "Alerts", "Sign up for email alerts" }, { 'A', CAPCLASS_ALERT|CAPCLASS_SUPER, "Announce", "Send announcements to all subscribers" }, { 'D', CAPCLASS_OTHER, "Debug", "Enable debugging features" }, }; /* ** Generate HTML that lists all of the capability letters together with ** a brief summary of what each letter means. */ void capabilities_table(unsigned mClass){ int i; @ <table> for(i=0; i<sizeof(aCap)/sizeof(aCap[0]); i++){ if( (aCap[i].eClass & mClass)==0 ) continue; @ <tr><th valign="top">%c(aCap[i].cCap)</th> @ <td><i>%h(aCap[i].zAbbrev):</i> %h(aCap[i].zOneLiner)</td></tr> } @ </table> } /* ** Generate a "capability summary table" that shows the major capabilities ** against the various user categories. */ |
︙ | ︙ |
Changes to src/setupuser.c.
︙ | ︙ | |||
197 198 199 200 201 202 203 | @ Users with privilege <span class="capability">v</span> inherit the combined @ privileges of <span class="usertype">developer</span>, @ <span class="usertype">anonymous</span>, and @ <span class="usertype">nobody</span>. @ </p></li> @ @ <li><p>The permission flags are as follows:</p> | | > > > > > > > | > > > > > > > > | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | @ Users with privilege <span class="capability">v</span> inherit the combined @ privileges of <span class="usertype">developer</span>, @ <span class="usertype">anonymous</span>, and @ <span class="usertype">nobody</span>. @ </p></li> @ @ <li><p>The permission flags are as follows:</p> capabilities_table(CAPCLASS_ALL); @ </li> @ </ol> style_footer(); } /* ** WEBPAGE: setup_ucap_list ** ** A documentation page showing the meaning of the various user capabilities ** code letters. */ void setup_ucap_list(void){ style_header("User Capability Codes"); @ <h1>All capabilities</h1> capabilities_table(CAPCLASS_ALL); @ <h1>Capabilities associated with checked-in content</h1> capabilities_table(CAPCLASS_CODE); @ <h1>Capabilities associated with data transfer and sync</h1> capabilities_table(CAPCLASS_DATA); @ <h1>Capabilities associated with the forum</h1> capabilities_table(CAPCLASS_FORUM); @ <h1>Capabilities associated with tickets</h1> capabilities_table(CAPCLASS_TKT); @ <h1>Capabilities associated with wiki</h1> capabilities_table(CAPCLASS_WIKI); @ <h1>Administrative capabilities</h1> capabilities_table(CAPCLASS_SUPER); @ <h1>Miscellaneous capabilities</h1> capabilities_table(CAPCLASS_OTHER); style_footer(); } /* ** Return true if zPw is a valid password string. A valid ** password string is: ** |
︙ | ︙ |