StaticPermissionManager.php
67 self::$logger->debug("Permissions for $resource?$context?$action (->$actionKey): ".trim(StringUtil::getDump($result)));
139 $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
const AUTHORIZATION_SECTION
Definition: StaticPermissionManager.php:32
const PERMISSION_MODIFIER_ALLOW
Definition: PermissionManager.php:22
StaticPermissionManager retrieves authorization rules from the application configuration.
Definition: StaticPermissionManager.php:30
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
InifileConfiguration reads the application configuration from ini files.
Definition: InifileConfiguration.php:30
$persistenceFacade
Definition: AbstractPermissionManager.php:44
$session
Definition: AbstractPermissionManager.php:45
StringUtil provides support for string manipulation.
Definition: StringUtil.php:18
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
createPermission($resource, $context, $action, $role, $modifier)
Definition: StaticPermissionManager.php:103
modifyPermission($resource, $context, $action, $role, $modifier)
Modify a permission for the given role.
Definition: StaticPermissionManager.php:124
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
setPermissions($resource, $context, $action, $permissions)
Definition: StaticPermissionManager.php:75
deserializePermissions($value)
Parse a permissions string and return an associative array with the keys 'default',...
Definition: AbstractPermissionManager.php:297
ConfigActionKeyProvider searches for action keys in the application configuration.
Definition: ConfigActionKeyProvider.php:22
An action key is a combination of a resource, context and action that is represented as a string.
Definition: ActionKey.php:22
removePermission($resource, $context, $action, $role)
Definition: StaticPermissionManager.php:110
getConfigurationInstance()
Get the configuration instance and file that is used to store the permissions.
Definition: StaticPermissionManager.php:157
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: StaticPermissionManager.php:60
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
__construct(PersistenceFacade $persistenceFacade, Session $session, Configuration $configuration)
Constructor.
Definition: StaticPermissionManager.php:45