wCMF
3.6
|
Public Member Functions | |
& | getInstance () |
getAuthUserVarname () | |
& | getAuthUser () |
isAnonymous () | |
deactivate () | |
activate () | |
authorize ($resource, $context, $action) | |
getRight ($config, $resource, $context, $action) | |
createPermission ($config, $resource, $context, $action, $role, $modifier) | |
removePermission ($config, $resource, $context, $action, $role) | |
modifyRight ($config, $resource, $context, $action, $role, $modifier) | |
Public Attributes | |
$_anonymousUser = null | |
RightsManager is used to handle all authorization requests.
Definition at line 50 of file class.RightsManager.php.
& RightsManager::getInstance | ( | ) |
Returns an instance of the class.
Definition at line 58 of file class.RightsManager.php.
Referenced by Controller\assignViewDefaults(), PersistenceMapper\checkAuthorization(), UserController\executeKernel(), ConcurrencyController\executeKernel(), AsyncPagingController\executeKernel(), EditRightsController\executeKernel(), DisplayController\executeKernel(), PagingController\executeKernel(), TreeViewController\getChildren(), SearchController\getObjects(), User\getRoles(), LockManager\getUser(), LockManager\handleLocking(), Application\initialize(), AuthUser\login(), ActionMapper\processAction(), NodeSerializer\serializeNode(), smarty_block_if_authorized(), and LogOutputStrategy\writeObject().
RightsManager::getAuthUserVarname | ( | ) |
Get session variable name for the authenticated user.
Definition at line 75 of file class.RightsManager.php.
Referenced by LoginController\executeKernel(), and getAuthUser().
& RightsManager::getAuthUser | ( | ) |
Get authenticated user.
Definition at line 83 of file class.RightsManager.php.
References $_anonymousUser, getAuthUserVarname(), SessionData\getInstance(), and isAnonymous().
Referenced by authorize().
RightsManager::isAnonymous | ( | ) |
See if the RightsManager is working in anonymous mode. In anonymous mode all authorization requests answered positive and AuthUser is an instance of AnonymousUser The mode is set in configuration section 'cms' key 'anonymous'
Definition at line 108 of file class.RightsManager.php.
References InifileParser\getInstance().
Referenced by authorize(), and getAuthUser().
RightsManager::deactivate | ( | ) |
Deactivate rights checking by setting the anonymous confguration value.
Definition at line 116 of file class.RightsManager.php.
References InifileParser\getInstance().
RightsManager::activate | ( | ) |
(Re-)activate rights checking by unsetting the anonymous confguration value.
Definition at line 124 of file class.RightsManager.php.
References InifileParser\getInstance().
RightsManager::authorize | ( | $resource, | |
$context, | |||
$action | |||
) |
Authorize for given resource, context, action triple.
resource | The resource to authorize (e.g. class name of the Controller or OID). |
context | The context in which the action takes place. |
action | The action to process. |
Definition at line 136 of file class.RightsManager.php.
References $PUBLIC_ACTIONS, AUTHORIZATION_SECTION, PersistenceFacade\decomposeOID(), getAuthUser(), WCMFInifileParser\getInstance(), isAnonymous(), and PersistenceFacade\isValidOID().
RightsManager::getRight | ( | $config, | |
$resource, | |||
$context, | |||
$action | |||
) |
Get the rights on a resource, context, action combination.
config | The configuration file to create the right in. |
resource | The resource (e.g. class name of the Controller or OID). |
context | The context in which the action takes place. |
action | The action to process. |
Definition at line 181 of file class.RightsManager.php.
References AUTHORIZATION_SECTION, and AuthUser\parsePolicy().
RightsManager::createPermission | ( | $config, | |
$resource, | |||
$context, | |||
$action, | |||
$role, | |||
$modifier | |||
) |
Create/Change a permission for a role on a resource, context, action combination.
config | The configuration file to create the right in. |
resource | The resource (e.g. class name of the Controller or OID). |
context | The context in which the action takes place. |
action | The action to process. |
role | The role to authorize. |
modifier | One of the RIGHT_MODIFIER_ constants. |
Definition at line 202 of file class.RightsManager.php.
References modifyRight().
RightsManager::removePermission | ( | $config, | |
$resource, | |||
$context, | |||
$action, | |||
$role | |||
) |
Remove a role from a right on a resource, context, action combination.
config | The configuration file to remove the right from. |
resource | The resource (e.g. class name of the Controller or OID). |
context | The context in which the action takes place. |
action | The action to process. |
role | The role to remove. |
Definition at line 215 of file class.RightsManager.php.
References modifyRight().
RightsManager::modifyRight | ( | $config, | |
$resource, | |||
$context, | |||
$action, | |||
$role, | |||
$modifier | |||
) |
Modify a right of a role on a resource, context, action combination.
config | The configuration file to remove the right from. |
resource | The resource (e.g. class name of the Controller or OID). |
context | The context in which the action takes place. |
action | The action to process. |
role | The role for which to cancel authorization. |
modifier | One of the RIGHT_MODIFIER_ constants or null (which means remove role). |
Definition at line 229 of file class.RightsManager.php.
References AUTHORIZATION_SECTION.
Referenced by createPermission(), and removePermission().
RightsManager::$_anonymousUser = null |
Definition at line 52 of file class.RightsManager.php.
Referenced by getAuthUser().