Changes between Version 1 and Version 2 of ExtraPermissionsProvider
- Timestamp:
- Jun 3, 2011, 10:03:45 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExtraPermissionsProvider
v1 v2 1 1 == [source:trunk/tracopt/perm/config_perm_provider.py tracopt.perm.config_perm_provider.ExtraPermissionsProvider] 2 2 3 Optional component which makes it possible to easily add new permissions using an `[extra-permissions]` section in the TracIni.3 Optional component which makes it possible to easily add new permissionsto to a Trac environment. These can be used for example in configurable TracWorkflow``s, when one wants to add a permission specific to a transition, via the `.permissions` key. 4 4 5 This can be used for example in configurable TracWorkflow``s, when one wants to add a permission specific to a transition, via the `.permissions` key. 5 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: 6 {{{ 7 [extra-permissions] 8 extra_admin = extra_view, extra_modify, extra_delete 9 }}} 10 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. 6 11 7 See also: #9392. 12 If you don't want a meta-permission, start the meta-name with an underscore (`_`): 13 {{{ 14 [extra-permissions] 15 _perms = extra_view, extra_modify 16 }}} 17 18 19 See also: #9392, [source:trunk/tracopt/perm/config_perm_provider.py#L18 config_perm_provider.py]