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 your 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 }}}