Edgewall Software

Changes between Version 1 and Version 2 of ExtraPermissionsProvider


Ignore:
Timestamp:
Jun 3, 2011, 10:03:45 AM (11 years ago)
Author:
Peter Suter
Comment:

Add documentation from source docstring

Legend:

Unmodified
Added
Removed
Modified
  • ExtraPermissionsProvider

    v1 v2  
    11== [source:trunk/tracopt/perm/config_perm_provider.py tracopt.perm.config_perm_provider.ExtraPermissionsProvider]
    22
    3 Optional component which makes it possible to easily add new permissions using an `[extra-permissions]` section in the TracIni.
     3Optional 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.
    44
    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.
     5To 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]
     8extra_admin = extra_view, extra_modify, extra_delete
     9}}}
     10This 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.
    611
    7 See also: #9392.
     12If 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
     19See also: #9392, [source:trunk/tracopt/perm/config_perm_provider.py#L18 config_perm_provider.py]