Changes between Version 7 and Version 8 of ExtraPermissionsProvider
- Timestamp:
- Jan 18, 2017, 2:04:40 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExtraPermissionsProvider
v7 v8 3 3 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. 4 4 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: 5 To add new permissions, create a new section `[extra-permissions]` in 6 [TracIni#extra-permissions-section trac.ini]. Every entry in that section defines a meta-permission 7 and a comma-separated list of permissions. For example: 6 8 {{{#!ini 7 9 [extra-permissions] 8 10 EXTRA_ADMIN = EXTRA_VIEW, EXTRA_MODIFY, EXTRA_DELETE 9 11 }}} 10 This entry will define three new permissions `EXTRA_VIEW`, `EXTRA_MODIFY` and `EXTRA_DELETE`, as well as a meta-permission `EXTRA_ADMIN` that grants all three permissions. 12 This entry will define three new permissions `EXTRA_VIEW`, 13 `EXTRA_MODIFY` and `EXTRA_DELETE`, as well as a meta-permissions 14 `EXTRA_ADMIN` that grants all three permissions. 11 15 12 If you don't want a meta-permission, start the meta-name with an underscore (`_`): 16 The permissions are created in upper-case characters regardless of 17 the casing of the definitions in `trac.ini`. For example, the 18 definition `extra_view` would create the permission `EXTRA_VIEW`. 19 20 If you don't want a meta-permission, start the meta-name with an 21 underscore (`_`): 13 22 {{{#!ini 14 23 [extra-permissions]