Detailed Description
StaticPermissionManager retrieves authorization rules from the application configuration.
Definition at line 30 of file StaticPermissionManager.php.
Public Member Functions | |
__construct (PersistenceFacade $persistenceFacade, Session $session, Configuration $configuration) | |
getPermissions ($resource, $context, $action) | |
setPermissions ($resource, $context, $action, $permissions) | |
createPermission ($resource, $context, $action, $role, $modifier) | |
removePermission ($resource, $context, $action, $role) | |
Public Member Functions inherited from AbstractPermissionManager | |
__construct (PersistenceFacade $persistenceFacade, Session $session, array $dynamicRoles=[]) | |
setPrincipalFactory (PrincipalFactory $principalFactory) | |
authorize ($resource, $context, $action, $login=null, $applyDefaultPolicy=true) | |
addTempPermission ($resource, $context, $action) | |
removeTempPermission ($handle) | |
hasTempPermission ($resource, $context, $action) | |
clearTempPermissions () | |
Public Attributes | |
const | AUTHORIZATION_SECTION = 'authorization' |
Public Attributes inherited from AbstractPermissionManager | |
const | RESOURCE_TYPE_ENTITY_TYPE = 'entity.type' |
const | RESOURCE_TYPE_ENTITY_TYPE_PROPERTY = 'entity.type.property' |
const | RESOURCE_TYPE_ENTITY_INSTANCE = 'entity.instance' |
const | RESOURCE_TYPE_ENTITY_INSTANCE_PROPERTY = 'entity.instance.property' |
const | RESOURCE_TYPE_OTHER = 'other' |
Public Attributes inherited from PermissionManager | |
const | PERMISSION_MODIFIER_ALLOW = '+' |
const | PERMISSION_MODIFIER_DENY = '-' |
Protected Member Functions | |
modifyPermission ($resource, $context, $action, $role, $modifier) | |
getConfigurationInstance () | |
Protected Member Functions inherited from AbstractPermissionManager | |
authorizeAction ($requestedResource, $permissionResource, $context, $action, $login) | |
getDefaultPolicy ($login) | |
parseResource ($resource) | |
deserializePermissions ($value) | |
serializePermissions ($permissions) | |
matchRoles ($resource, $permissions, $login) | |
matchRole (User $user, $role, $resource) | |
Additional Inherited Members | |
Protected Attributes inherited from AbstractPermissionManager | |
$persistenceFacade = null | |
$session = null | |
$dynamicRoles = [] | |
$principalFactory = null | |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | PersistenceFacade | $persistenceFacade, |
Session | $session, | ||
Configuration | $configuration | ||
) |
Constructor.
- Parameters
-
$persistenceFacade $session $configuration
Definition at line 45 of file StaticPermissionManager.php.
Member Function Documentation
◆ getPermissions()
getPermissions | ( | $resource, | |
$context, | |||
$action | |||
) |
Implements PermissionManager.
Definition at line 60 of file StaticPermissionManager.php.
◆ setPermissions()
setPermissions | ( | $resource, | |
$context, | |||
$action, | |||
$permissions | |||
) |
Implements PermissionManager.
Definition at line 75 of file StaticPermissionManager.php.
◆ createPermission()
createPermission | ( | $resource, | |
$context, | |||
$action, | |||
$role, | |||
$modifier | |||
) |
Implements PermissionManager.
Definition at line 103 of file StaticPermissionManager.php.
◆ removePermission()
removePermission | ( | $resource, | |
$context, | |||
$action, | |||
$role | |||
) |
Implements PermissionManager.
Definition at line 110 of file StaticPermissionManager.php.
◆ modifyPermission()
|
protected |
Modify a permission for the given role.
- Parameters
-
$resource The resource (e.g. class name of the Controller or object id). $context The context in which the action takes place. $action The action to process. $role The role to authorize. $modifier One of the PERMISSION_MODIFIER_ constants, null, if the permission should be removed.
- Returns
- boolean
Definition at line 124 of file StaticPermissionManager.php.
◆ getConfigurationInstance()
|
protected |
Get the configuration instance and file that is used to store the permissions.
- Returns
- Associative array with keys 'instance' and 'file'.
Definition at line 157 of file StaticPermissionManager.php.
Member Data Documentation
◆ AUTHORIZATION_SECTION
const AUTHORIZATION_SECTION = 'authorization' |
Definition at line 32 of file StaticPermissionManager.php.