| 1 | == Trac Permissions == |
| 2 | |
| 3 | Trac uses a flexible permission system to control what different users can do |
| 4 | in the system. |
| 5 | |
| 6 | When a user first uses a system he/she will be able to do certain things. |
| 7 | Exactly what he/she can do depend on which privileges you have granted to |
| 8 | the special user {{{anonymous}}}. |
| 9 | In addition to these privileges different users can be granted additional |
| 10 | rights as soon as they login into the system. |
| 11 | |
| 12 | === Available privileges === |
| 13 | |
| 14 | * {{{TRAC_ADMIN}}} |
| 15 | * {{{LOG_VIEW}}} |
| 16 | * {{{FILE_VIEW}}} |
| 17 | * {{{CHANGESET_VIEW}}} |
| 18 | * {{{BROWSER_VIEW}}} |
| 19 | * {{{TICKET_VIEW, TICKET_CREATE, TICKET_MODIFY, TICKET_ADMIN}}} |
| 20 | * {{{REPORT_VIEW, REPORT_CREATE, REPORT_MODIFY, REPORT_DELETE, REPORT_ADMIN}}} |
| 21 | * {{{WIKI_VIEW, WIKI_CREATE, WIKI_MODIFY, WIKI_DELETE, WIKI_ADMIN}}} |
| 22 | * {{{TIMELINE_VIEW}}} |
| 23 | * {{{SEARCH_VIEW}}} |
| 24 | * {{{CONFIG_VIEW}}} |
| 25 | |
| 26 | The {{{something_ADMIN}}} privileges are just shortcuts that can be used to grant a user all the ''something'' privileges in one go. Having {{{TRAC_ADMIN}}} |
| 27 | is like being {{{root}}} on a *NIX system, it will let you do anything you want. |
| 28 | |
| 29 | === Granting privileges === |
| 30 | |
| 31 | Currently the only way to grant privileges to users is by using the |
| 32 | {{{trac-admin}}} script. The current set of privileges can be listed |
| 33 | with the following command: |
| 34 | |
| 35 | {{{ |
| 36 | $ trac-admin /path/to/my.db permission list |
| 37 | }}} |
| 38 | |
| 39 | This command will let the user ''bob'' to delete reports: |
| 40 | |
| 41 | {{{ |
| 42 | $ trac-admin /path/to/my.db permission add bob REPORT_DELETE |
| 43 | }}} |
| 44 | |
| 45 | === Default permissions === |
| 46 | |
| 47 | Granting privileges to the special user ''anonymous'' can be used to control |
| 48 | what an anonymous user can do before they have logged in. |
| 49 | |
| 50 | In the same way, privileges granted to the special user ''authenticated'' will apply to any authenticated (logged in) user. |