Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ActionSecurityUtil Class Reference

Inheritance diagram for ActionSecurityUtil:
TaskActionSecurityUtil

Static Public Member Functions

static canCurrentUserPerformAction ($actionType, $model)
static canUserPerformAction ($actionType, $model, $user)
static resolveLinkToModelForCurrentUser ($attributeString, $model, $moduleClassName, $linkRoute, $offset=null, $additionalParams=array())
static resolveLinkToEditModelForCurrentUser ($attributeString, $model, $moduleClassName, $linkRoute, $redirectUrl=null)

Detailed Description

Helper class for working with action security classes

Definition at line 40 of file ActionSecurityUtil.php.


Member Function Documentation

static canCurrentUserPerformAction ( actionType,
model 
) [static]
static canUserPerformAction ( actionType,
model,
user 
) [static]

Check if user can perform an action. Action type examples: Details, Edit, Delete. Action types are returned by actionElements via getActionType method. If the model is not a securable model then return true. If the model is a Permitable such as User this will return true. This does not necessarily mean the current user is allowed through the user interface to edit the $model (User). This must be controlled by controller rights filters.

Parameters:
$actionType 
$model 
$user 
Returns:
bool true if user can perform action.

Definition at line 63 of file ActionSecurityUtil.php.

static resolveLinkToModelForCurrentUser ( attributeString,
model,
moduleClassName,
linkRoute,
offset = null,
additionalParams = array() 
) [static]

Resolve a link to a related model. Used by

See also:
ListView for each row of a list for example. If the current user can Permission::READ the related model, then check if the current user has RIGHT_ACCESS_ to the model's related module. If current user has access then return link, otherwise return text. If current user cannot Permission::READ then return null.
Parameters:
$attributeString 
$model 
$moduleClassName 
$linkRoute 
null $offset
Returns:
null|string

Definition at line 98 of file ActionSecurityUtil.php.

static resolveLinkToEditModelForCurrentUser ( attributeString,
model,
moduleClassName,
linkRoute,
redirectUrl = null 
) [static]

Resolve a link to a related model for editing. Used by some modal views for example. If the current user can Permission::WRITE the related model, then check if the current user has RIGHT_ACCESS_ to the model's related module. If current user has access then return link, otherwise return text. If current user cannot Permission::WRITE then return null.

Parameters:
$attributeString 
$model 
$moduleClassName 
$linkRoute 
null $redirectUrl
Returns:
null|string

Definition at line 149 of file ActionSecurityUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Mar 20 07:10:48 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8