Trees Indices Help
Trac
Package trac :: Module perm :: Class PermissionSystem

Class PermissionSystem

source code

 object --+ 
 | 
core.Component --+
 |
 PermissionSystem

Permission management sub-system.
Nested Classes

Inherited from core.Component : __metaclass__

Instance Methods
__init__(self, compmgr, init=<function __init__ at 0x7f8a65783b18>, cls=<class 'trac.perm.PermissionSystem'>)
x.__init__(...) initializes x; see help(type(x)) for signature source code
grant_permission(self, username, action)
Grant the user with the given name permission to perform to specified action. source code
revoke_permission(self, username, action)
Revokes the permission of the specified user to perform an action. source code
get_actions(self) source code
get_user_permissions(self, username=None)
Return the permissions of the specified user. source code
get_all_permissions(self)
Return all permissions for all users. source code
get_users_with_permission(self, permission)
Return all users that have the specified permission. source code
expand_actions(self, actions)
Helper method for expanding all meta actions. source code
check_permission(self, action, username=None, resource=None, perm=None)
Return True if permission to perform action for the given resource is allowed. source code
get_permission_actions(self)
Implement the global TRAC_ADMIN meta permission. source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component : __new__ , implements

Class Variables
required = True
store = <ExtensionOption [trac] "permission_store">
policies = <OrderedExtensionsOption [trac] "permission_policies">
CACHE_EXPIRY = 5
CACHE_REAP_TIME = 60
Properties
requestors
List of components that implement IPermissionRequestor

Inherited from object: __class__

Method Details

__init__(self, compmgr, init=<function __init__ at 0x7f8a65783b18>, cls=<class 'trac.perm.PermissionSystem'>)
(Constructor)

source code
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

get_user_permissions(self, username=None)

source code

Return the permissions of the specified user.

The return value is a dictionary containing all the actions as keys, and a boolean value. True means that the permission is granted, False means the permission is denied.

get_all_permissions(self)

source code

Return all permissions for all users.

The permissions are returned as a list of (subject, action) formatted tuples.

get_users_with_permission(self, permission)

source code

Return all users that have the specified permission.

Users are returned as a list of user names.

get_permission_actions(self)

source code

Implement the global TRAC_ADMIN meta permission.

Implements also the EMAIL_VIEW permission which allows for showing email addresses even if [trac] show_email_addresses is false.


Property Details

requestors

List of components that implement IPermissionRequestor
Get Method:
unreachable.extensions(component) - Return a list of components that declare to implement the extension point interface.

Trees Indices Help
Trac

AltStyle によって変換されたページ (->オリジナル) /