PermissionManager.php
34 * @param $resource The resource to authorize (e.g. class name of the Controller or ObjectId instance).
37 * @param $login The login of the user to use for authorization (optional, default: the value of Session::getAuthUser())
38 * @param $applyDefaultPolicy Boolean whether to apply a default policy, if no authorization rule is set for this request (optional, default: true)
getPermissions($resource, $context, $action)
Permission management.
createPermission($resource, $context, $action, $role, $modifier)
Create/Change a permission for a role on a resource, context, action combination.
addTempPermission($resource, $context, $action)
Add a temporary permission for the current user.
removeTempPermission($handle)
Remove a temporary permission for the current user.
const PERMISSION_MODIFIER_ALLOW
Definition: PermissionManager.php:22
authorize($resource, $context, $action, $login=null, $applyDefaultPolicy=true)
Authorize for given resource, context, action triple.
setPermissions($resource, $context, $action, $permissions)
Set the permissions on a resource, context, action combination.
clearTempPermissions()
Reset all temporary permissions.
removePermission($resource, $context, $action, $role)
Remove a role from a permission on a resource, context, action combination.
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
hasTempPermission($resource, $context, $action)
Check if a temporary permission for the current user exists.
const PERMISSION_MODIFIER_DENY
Definition: PermissionManager.php:23