ControllerSecurityUtil Class Reference

Inheritance diagram for ControllerSecurityUtil:
ApiControllerSecurityUtil EmailMessagesControllerSecurityUtil LeadsControllerSecurityUtil

Static Public Member Functions

static doesCurrentUserHavePermissionOnSecurableItem ($securableItem, $permissionToCheck)
static resolveAccessCanCurrentUserReadModel (RedBeanModel $model, $fromAjax=false)
static resolveAccessCanCurrentUserWriteModel (RedBeanModel $model, $fromAjax=false)
static resolveAccessCanCurrentUserDeleteModel (RedBeanModel $model, $fromAjax=false)
static resolveAccessCanCurrentUserWriteModule ($moduleClassName, $fromAjax=false)
static resolveCanCurrentUserAccessModule ($moduleClassName, $fromAjax=false)

Static Protected Member Functions

static processAccessFailure ($fromAjax=false, $nonAjaxFailureMessageContent=null)
static renderAccessFailureContent ($fromAjax=false, $nonAjaxFailureMessageContent=null)

Detailed Description

Helper class to assist with security checks in controllers.

Definition at line 40 of file ControllerSecurityUtil.php.


Member Function Documentation

static doesCurrentUserHavePermissionOnSecurableItem ( securableItem,
permissionToCheck 
) [static]
Returns:
boolean - true if the current user has permission on model.

Definition at line 45 of file ControllerSecurityUtil.php.

static resolveAccessCanCurrentUserReadModel ( RedBeanModel model,
fromAjax = false 
) [static]

If a current user cannot read the model, then render a AccessFailurePageView and end the application.

Parameters:
$model - RedBeanModel
Returns:
null;

Definition at line 67 of file ControllerSecurityUtil.php.

static resolveAccessCanCurrentUserWriteModel ( RedBeanModel model,
fromAjax = false 
) [static]

If a current user cannot write the model, then render a AccessFailurePageView and end the application.

Parameters:
$model - RedBeanModel
Returns:
null;

Definition at line 83 of file ControllerSecurityUtil.php.

static resolveAccessCanCurrentUserDeleteModel ( RedBeanModel model,
fromAjax = false 
) [static]

If a current user cannot delete the model, then render a AccessFailurePageView and end the application.

Parameters:
$model - RedBeanModel
Returns:
null;

Definition at line 99 of file ControllerSecurityUtil.php.

static resolveAccessCanCurrentUserWriteModule ( moduleClassName,
fromAjax = false 
) [static]

If a current user cannot write the module, then render a AccessFailurePageView and end the application.

Parameters:
$model - RedBeanModel
Returns:
null;

Definition at line 115 of file ControllerSecurityUtil.php.

static resolveCanCurrentUserAccessModule ( moduleClassName,
fromAjax = false 
) [static]
Parameters:
string $moduleClassName
bool $fromAjax

Definition at line 131 of file ControllerSecurityUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Dec 13 07:10:23 2017