| 1 | = Super User Plugin = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | This plugin automatically gives a given username ''TRAC_ADMIN'' permissions. I find this useful for a multiproject setup with AccountManagerPlugin, where users and passwords are shared between all projects, and I want an '''admin''' user to have full permissions without manually setting it on every project. |
| 6 | |
| 7 | |
| 8 | == Bugs/Feature Requests == |
| 9 | |
| 10 | Existing bugs and feature requests for SuperUserPlugin are |
| 11 | [report:9?COMPONENT=SuperUserPlugin here]. |
| 12 | |
| 13 | If you have any issues, create a |
| 14 | [http://trac-hacks.org/newticket?component=SuperUserPlugin&owner=airadier new ticket]. |
| 15 | |
| 16 | == Download == |
| 17 | |
| 18 | Download the zipped source from [download:superuserplugin here]. |
| 19 | |
| 20 | == Source == |
| 21 | |
| 22 | You can check out SuperUserPlugin from [http://trac-hacks.org/svn/superuserplugin here] using Subversion, or [source:superuserplugin browse the source] with Trac. |
| 23 | |
| 24 | == Example == |
| 25 | |
| 26 | The plugin works by wrapping the current PermissionStore, in order to fake the superuser permissions (permissions are not added to the database, but added ''on the fly'' when requested). |
| 27 | |
| 28 | To enable the plugin, add the line: |
| 29 | |
| 30 | {{{ |
| 31 | [componentes] |
| 32 | tracsuperuser.* = enabled |
| 33 | }}} |
| 34 | |
| 35 | to the ''components'' section in trac.ini. |
| 36 | |
| 37 | Then, replace the current PermissionStore. In this example ''DefaultPermissionStore'' was used before installing the superuser plugin: |
| 38 | |
| 39 | {{{ |
| 40 | [trac] |
| 41 | ... |
| 42 | permission_store = SuperUserPlugin |
| 43 | superuser = admin |
| 44 | wrapped_permission_store = DefaultPermissionStore |
| 45 | ... |
| 46 | }}} |
| 47 | |
| 48 | Where: |
| 49 | * '''permission_store''': Use SuperUserPlugin as the new permission store. |
| 50 | * '''supersuser''': The name of the user with admin permissions |
| 51 | * '''wrapped_permission_store''': The permission store being used previously. If the user is not the superuser, this permission store will be used to retrieve the user permissions. |
| 52 | |
| 53 | |
| 54 | == Recent Changes == |
| 55 | |
| 56 | [[ChangeLog(superuserplugin, 3)]] |
| 57 | |
| 58 | == Author/Contributors == |
| 59 | |
| 60 | '''Author:''' [wiki:airadier] [[BR]] |
| 61 | '''Contributors:''' |