Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Static Public Member Functions
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:
Generated on Fri Aug 7 2020 07:10:38
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.