wcmf logo wemove logo

RightsManager Class Reference
[Security]

RightsManager is used to handle all authorization requests. More...


Public Member Functions

getInstance ()
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)

Data Fields

 $_anonymousUser = null

Detailed Description

RightsManager is used to handle all authorization requests.

Author:
ingo herwig <ingo@wemove.com>

Definition at line 50 of file class.RightsManager.php.


Member Function Documentation

& getInstance (  ) 

& getAuthUser (  ) 

Get authenticated user.

Returns:
AuthUser object or null if not logged in.

Definition at line 75 of file class.RightsManager.php.

References getInstance(), and isAnonymous().

Referenced by authorize().

Here is the call graph for this function:

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'

Returns:
True/False wether in anonymous mode

Definition at line 99 of file class.RightsManager.php.

References getInstance().

Referenced by authorize(), and getAuthUser().

Here is the call graph for this function:

deactivate (  ) 

Deactivate rights checking by setting the anonymous confguration value.

Definition at line 107 of file class.RightsManager.php.

References getInstance().

Here is the call graph for this function:

activate (  ) 

(Re-)activate rights checking by unsetting the anonymous confguration value.

Definition at line 115 of file class.RightsManager.php.

References getInstance().

Here is the call graph for this function:

authorize ( resource,
context,
action 
)

Authorize for given resource, context, action triple.

Parameters:
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.
Returns:
True/False whether authorization succeded/failed.

Definition at line 127 of file class.RightsManager.php.

References $PUBLIC_ACTIONS, PersistenceFacade::decomposeOID(), getAuthUser(), getInstance(), isAnonymous(), and PersistenceFacade::isValidOID().

Here is the call graph for this function:

getRight ( config,
resource,
context,
action 
)

Get the rights on a resource, context, action combination.

Parameters:
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.
Returns:
An assoziative array with keys 'default', 'allow', 'deny' and the attached roles as values.
See also:
AuthUser::parsePolicy

Definition at line 172 of file class.RightsManager.php.

References AuthUser::parsePolicy().

Here is the call graph for this function:

createPermission ( config,
resource,
context,
action,
role,
modifier 
)

Create/Change a permission for a role on a resource, context, action combination.

Parameters:
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.
Returns:
True/False whether creation succeded/failed.

Definition at line 193 of file class.RightsManager.php.

References modifyRight().

Here is the call graph for this function:

removePermission ( config,
resource,
context,
action,
role 
)

Remove a role from a right on a resource, context, action combination.

Parameters:
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.
Returns:
True/False whether removal succeded/failed.

Definition at line 206 of file class.RightsManager.php.

References modifyRight().

Here is the call graph for this function:

modifyRight ( config,
resource,
context,
action,
role,
modifier 
)

Modify a right of a role on a resource, context, action combination.

Parameters:
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).
Returns:
True/False whether modification succeded/failed.

Definition at line 220 of file class.RightsManager.php.

Referenced by createPermission(), and removePermission().


Field Documentation

$_anonymousUser = null

Definition at line 52 of file class.RightsManager.php.


The documentation for this class was generated from the following file:

This page generated via doxygen 1.5.8 Mon Mar 30 01:58:45 2009.
Copyright © 2009 wemove digital solutions GmbH.
sourceforge logo