tracopt.perm.config_perm_provider
¶
-
class
tracopt.perm.config_perm_provider.
ExtraPermissionsProvider
¶ Bases:
trac.core.Component
Define arbitrary permissions.
Documentation can be found on the [wiki:TracIni#extra-permissions-section] page after enabling the component.
-
extra_permissions_section
¶ This section provides a way to add arbitrary permissions to a Trac environment. This can be useful for adding new permissions to use for workflow actions, for example.
To add new permissions, create a new section
[extra-permissions]
in yourtrac.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 permissionsEXTRA_VIEW
,EXTRA_MODIFY
andEXTRA_DELETE
, as well as a meta-permissionsEXTRA_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 definitionextra_view
would create the permissionEXTRA_VIEW
.If you don’t want a meta-permission, start the meta-name with an underscore (
_
): {{{#!ini [extra-permissions] _perms = EXTRA_VIEW, EXTRA_MODIFY }}}
-