DefaultPermissionManager.php
78 self::$logger->debug("Permissions for $resource?$context?$action (->$actionKey): ".trim(StringUtil::getDump($result)));
149 $newValue = preg_replace('/ +/', ' ', str_replace([PermissionManager::PERMISSION_MODIFIER_ALLOW.$role,
Session is the interface for session implementations and defines access to session variables.
Definition: Session.php:19
static getDump($variable, $strlen=100, $width=25, $depth=10, $i=0, &$objects=[])
Get the dump of a variable as string.
Definition: StringUtil.php:29
PersistenceActionKeyProvider searches for action keys in the application storage.
Definition: PersistenceActionKeyProvider.php:28
modifyPermission($resource, $context, $action, $role, $modifier)
Modify a permission for the given role.
Definition: DefaultPermissionManager.php:136
const PERMISSION_MODIFIER_ALLOW
Definition: PermissionManager.php:22
static getBestMatch(ActionKeyProvider $actionKeyProvider, $resource, $context, $action)
Get an action key that matches a given combination of resource, context, action best.
Definition: ActionKey.php:55
setPermissions($resource, $context, $action, $permissions)
Definition: DefaultPermissionManager.php:86
static asValue($operator, $value)
Factory method for constructing a Criteria that may be used as value on a PersistentObject's attribut...
Definition: Criteria.php:58
$persistenceFacade
Definition: AbstractPermissionManager.php:44
$session
Definition: AbstractPermissionManager.php:45
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
removePermission($resource, $context, $action, $role)
Definition: DefaultPermissionManager.php:122
Criteria defines a condition on a PersistentObject's attribute used to select specific instances.
Definition: Criteria.php:21
DefaultPermissionManager retrieves authorization rules the storage.
Definition: DefaultPermissionManager.php:32
getPermissionInstance($resource, $context, $action)
Get the permission object that matches the given parameters.
Definition: DefaultPermissionManager.php:168
BuildDepth values are used to define the depth when loading object trees.
Definition: BuildDepth.php:19
createPermissionObject($resource, $context, $action, $roles)
Create a permission object with the given parameters.
Definition: DefaultPermissionManager.php:186
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
deserializePermissions($value)
Parse a permissions string and return an associative array with the keys 'default',...
Definition: AbstractPermissionManager.php:297
createPermission($resource, $context, $action, $role, $modifier)
Definition: DefaultPermissionManager.php:115
__construct(PersistenceFacade $persistenceFacade, Session $session)
Constructor.
Definition: DefaultPermissionManager.php:44
An action key is a combination of a resource, context and action that is represented as a string.
Definition: ActionKey.php:22
AbstractPermissionManager is the base class for concrete PermissionManager implementations.
Definition: AbstractPermissionManager.php:31
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20
getPermissions($resource, $context, $action)
Definition: DefaultPermissionManager.php:71
serializePermissions($permissions)
Convert an associative permissions array with keys 'default', 'allow', 'deny' into a string.
Definition: AbstractPermissionManager.php:345
setPermissionType($permissionType)
Set the entity type name of Permission instances.
Definition: DefaultPermissionManager.php:63
ObjectQuery implements a template based object query.
Definition: ObjectQuery.php:106
const PERMISSION_MODIFIER_DENY
Definition: PermissionManager.php:23