Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
+0
Start Page
Index
History
Editing ExtraPermissionsProvider
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
== [source:trunk/tracopt/perm/config_perm_provider.py tracopt.perm.config_perm_provider.ExtraPermissionsProvider] `ExtraPermissionsProvider` is an optional component which makes it possible to easily add new permissions to a Trac environment. These can be used, for example, in configurable [wiki:TracWorkflow]s, when one wants to add a permission specific to a transition, via the `.permissions` key. The component is disabled by default, so it must be enabled in the [[TracIni#components-section|configuration]]: {{{#!ini [components] tracopt.perm.config_perm_provider.* = enabled }}} To add new permissions, create a new section `[extra-permissions]` in [TracIni#extra-permissions-section trac.ini]. Every entry in that section defines a meta-permission and a comma-separated list of permissions. For example: {{{#!ini [extra-permissions] EXTRA_ADMIN = EXTRA_VIEW, EXTRA_MODIFY, EXTRA_DELETE }}} This entry will define three new permissions `EXTRA_VIEW`, `EXTRA_MODIFY` and `EXTRA_DELETE`, as well as a meta-permissions `EXTRA_ADMIN` that grants all three permissions. The permissions are created in upper-case characters regardless of the casing of the definitions in `trac.ini`. For example, the definition `extra_view` would create the permission `EXTRA_VIEW`. If you don't want a meta-permission, start the meta-name with an underscore (`_`): {{{#!ini [extra-permissions] _perms = EXTRA_VIEW, EXTRA_MODIFY }}} See also: #9392, [source:trunk/tracopt/perm/config_perm_provider.py#L18 config_perm_provider.py]
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.