AbstractPermissionManager.php
82 self::$logger->debug("Checking authorization for: '$resource?$context?$action' and user '".$login."'");
178 self::$logger->debug("Result for $resource?$context?$action: ".(!$authorized ? "not " : "")."authorized");
222 self::$logger->debug("Result: ".(is_bool($authorized) ? ((!$authorized ? "not " : "")."authorized") : "not defined"));
346 $result = $permissions['default'] === true ? PermissionManager::PERMISSION_MODIFIER_ALLOW.'* ' :
Session is the interface for session implementations and defines access to session variables.
Definition: Session.php:19
getPermissions($resource, $context, $action)
Permission management.
static getDump($variable, $strlen=100, $width=25, $depth=10, $i=0, &$objects=[])
Get the dump of a variable as string.
Definition: StringUtil.php:29
setPrincipalFactory(PrincipalFactory $principalFactory)
Set the principal factory instances.
Definition: AbstractPermissionManager.php:69
const PERMISSION_MODIFIER_ALLOW
Definition: PermissionManager.php:22
const RESOURCE_TYPE_ENTITY_TYPE
Definition: AbstractPermissionManager.php:33
__construct(PersistenceFacade $persistenceFacade, Session $session, array $dynamicRoles=[])
Constructor.
Definition: AbstractPermissionManager.php:54
const RESOURCE_TYPE_OTHER
Definition: AbstractPermissionManager.php:37
$persistenceFacade
Definition: AbstractPermissionManager.php:44
$session
Definition: AbstractPermissionManager.php:45
addTempPermission($resource, $context, $action)
Definition: AbstractPermissionManager.php:412
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
hasRole($roleName)
Check for a certain role in the user roles.
static parse($oid)
Parse a serialized object id string into an ObjectId instance.
Definition: ObjectId.php:135
const RESOURCE_TYPE_ENTITY_INSTANCE
Definition: AbstractPermissionManager.php:35
matchRoles($resource, $permissions, $login)
Matches the roles of the user and the roles in the given permissions.
Definition: AbstractPermissionManager.php:371
static createKey($resource, $context, $action)
Create an action key from the given values.
Definition: ActionKey.php:33
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
$principalFactory
Definition: AbstractPermissionManager.php:47
deserializePermissions($value)
Parse a permissions string and return an associative array with the keys 'default',...
Definition: AbstractPermissionManager.php:297
const RESOURCE_TYPE_ENTITY_TYPE_PROPERTY
Definition: AbstractPermissionManager.php:34
hasTempPermission($resource, $context, $action)
Definition: AbstractPermissionManager.php:436
clearTempPermissions()
Definition: AbstractPermissionManager.php:469
An action key is a combination of a resource, context and action that is represented as a string.
Definition: ActionKey.php:22
const USER_GROUP_NAME
Definition: AnonymousUser.php:22
parseResource($resource)
Get the resource type and parameters (as applicable) from a resource.
Definition: AbstractPermissionManager.php:247
authorize($resource, $context, $action, $login=null, $applyDefaultPolicy=true)
Definition: AbstractPermissionManager.php:76
PrincipalFactory implementations are used to retrieve User and Role instances.
Definition: PrincipalFactory.php:19
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
removeTempPermission($handle)
Definition: AbstractPermissionManager.php:426
PersistenceAction values are used to define actions on PersistentObject instances.
Definition: PersistenceAction.php:19
matchRole(User $user, $role, $resource)
Check if a user matches the role for a resource.
Definition: AbstractPermissionManager.php:403
$dynamicRoles
Definition: AbstractPermissionManager.php:46
authorizeAction($requestedResource, $permissionResource, $context, $action, $login)
Authorize a resource, context, action triple by using the permissions set on another resource (e....
Definition: AbstractPermissionManager.php:195
const RESOURCE_TYPE_ENTITY_INSTANCE_PROPERTY
Definition: AbstractPermissionManager.php:36
getDefaultPolicy($login)
Get the default policy that is used if no permission is set up for a requested action.
Definition: AbstractPermissionManager.php:233
serializePermissions($permissions)
Convert an associative permissions array with keys 'default', 'allow', 'deny' into a string.
Definition: AbstractPermissionManager.php:345
const PERMISSION_MODIFIER_DENY
Definition: PermissionManager.php:23