RightsUtil Class Reference

Static Public Member Functions

static getAllModuleRightsDataByPermitable (Permitable $permitable)
static canUserAccessModule ($moduleClassName, $user)
static doesUserHaveAllowByRightName ($moduleClassName, $rightName, $user)
static cacheAllRightsByPermitable (Permitable $permitable)

Static Protected Member Functions

static getRightStringFromRight ($right)

Detailed Description

Helper class for Rights.

Definition at line 40 of file RightsUtil.php.


Member Function Documentation

static getAllModuleRightsDataByPermitable ( Permitable permitable  )  [static]
Returns:
array of all module rights data

Definition at line 45 of file RightsUtil.php.

static canUserAccessModule ( moduleClassName,
user 
) [static]

Given a user model and a module class name, can this user access the module tab or sub-tabs in the user interface. If the moduleClassName is not a subclass of securableModule then this function returns true. Otherwise it checks the access right for this module against the user.

See also:
SecurableModule::getAccessRightName
Returns:
boolean.

Definition at line 103 of file RightsUtil.php.

static doesUserHaveAllowByRightName ( moduleClassName,
rightName,
user 
) [static]

Given a user model, a module class name, and a right name, checks if user can perform the right.

Returns:
boolean.

Definition at line 121 of file RightsUtil.php.

static cacheAllRightsByPermitable ( Permitable permitable  )  [static]

Used to cache all rights for a permitable. This can be done by an administrator to cache all user rights Then when users login, their rights are cached for improved performance

See also:
DevelopmentController function actionRebuildSecurityCache
Parameters:
Permitable $permitable
Exceptions:
NotSupportedException 

Definition at line 141 of file RightsUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Thu Sep 19 07:11:09 2019