PermissionController Class Reference

Detailed Description

PermissionController checks, gets and sets permissions.

The controller supports the following actions:

Action checkPermissions
Check permissions of a set of operations for the current user.
Parameter Description
in operations Array of resource/context/action triples in the form resource?context?action
out result Associative array with the operations as keys and boolean values indicating if permissions are given or not
Response Actions
ok In all cases
Action checkPermissionsOfUser
Check permissions of a set of operations for the given user.
Parameter Description
in operations Array of resource/context/action triples in the form resource?context?action
in user Username to check permissions for (optional, default: the authenticated user)
out result Associative array with the operations as keys and boolean values indicating if permissions are given or not
Response Actions
ok In all cases
Action getPermissions
Get the permissions on an operation.
Parameter Description
in operation A resource/context/action triple in the form resource?context?action
out result Assoziative array with keys 'default' (boolean), 'allow', 'deny' (arrays of role names) or null, if no permissions are defined.
Action setPermissions
Set the permissions on an operation.
Parameter Description
in operation A resource/context/action triple in the form resource?context?action
in permissions Assoziative array with keys 'default' (boolean), 'allow', 'deny' (arrays of role names).
Action createPermission
Create/Change a permission for a role on an operation.
Parameter Description
in operation A resource/context/action triple in the form resource?context?action
in role The role to add.
in modifier + or - whether to allow or disallow the action for the role.
Action removePermission
Remove a role from a permission on an operation.
Parameter Description
in operation A resource/context/action triple in the form resource?context?action
in role The role to remove.
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 97 of file PermissionController.php.

+ Inheritance diagram for PermissionController:

Protected Member Functions

 validate ()
 
 doExecute ($method=null)
 
- Protected Member Functions inherited from Controller
 executeSubAction ($action)
 
 redirect ($location, $key=null, $data=null)
 
 getLogger ()
 
 getSession ()
 
 getPersistenceFacade ()
 
 getPermissionManager ()
 
 getActionMapper ()
 
 getLocalization ()
 
 getMessage ()
 
 getConfiguration ()
 
 requireTransaction ()
 
 endTransaction ($commit)
 
 isLocalizedRequest ()
 
 checkLanguageParameter ()
 
 generateCsrfToken ($name, $refresh=true)
 
 validateCsrfToken ($name, $invalidate=true)
 
 getLocalSessionValue ($key, $default=null)
 
 setLocalSessionValue ($key, $value)
 
 clearLocalSessionValues ()
 

Additional Inherited Members

- Public Member Functions inherited from Controller
 __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration)
 
 initialize (Request $request, Response $response)
 
 execute ($method=null)
 
 getRequest ()
 
 getResponse ()
 
- Public Attributes inherited from Controller
const CSRF_TOKEN_PARAM = 'csrf_token'
 

Member Function Documentation

◆ validate()

validate ( )
protected
See also
Controller::validate()

Reimplemented from Controller.

Definition at line 102 of file PermissionController.php.

◆ doExecute()

doExecute (   $method = null)
protected
See also
Controller::doExecute()

Reimplemented from Controller.

Definition at line 139 of file PermissionController.php.