Class lispa\amos\core\rbac\AuthManager

Inheritancelispa\amos\core\rbac\AuthManager » yii\rbac\DbManager » yii\rbac\BaseManager » yii\base\Component » yii\base\Object
Implementsyii\base\Configurable, yii\rbac\ManagerInterface
Subclasseslispa\amos\core\rbac\DbManagerCached

Class AuthManager

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$assignmentTable string The name of the table storing authorization item assignments. yii\rbac\DbManager
$behaviors yii\base\Behavior[] List of behaviors attached to this component yii\base\Component
$cache yii\caching\Cache|array|string The cache used to improve RBAC performance. yii\rbac\DbManager
$cacheKey string The key used to store RBAC data in cache yii\rbac\DbManager
$db yii\db\Connection|array|string The DB connection object or the application component ID of the DB connection. yii\rbac\DbManager
$defaultRoleInstances yii\rbac\Role[] Default roles. yii\rbac\BaseManager
$defaultRoles array A list of role names that are assigned to every user automatically without calling assign(). yii\rbac\BaseManager
$itemChildTable string The name of the table storing authorization item hierarchy. yii\rbac\DbManager
$itemTable string The name of the table storing authorization items. yii\rbac\DbManager
$permissions yii\rbac\Permission[] All permissions in the system. yii\rbac\BaseManager
$roles yii\rbac\Role[] All roles in the system. yii\rbac\BaseManager
$ruleTable string The name of the table storing rules. yii\rbac\DbManager

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$items yii\rbac\Item[] All auth items (name => Item) yii\rbac\DbManager
$parents array Auth item parent-child relationships (childName => list of parents) yii\rbac\DbManager
$rules yii\rbac\Rule[] All auth rules (name => Rule) yii\rbac\DbManager

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Component
__clone() This method is called after the object is created by cloning an existing one. yii\base\Component
__construct() Constructor. yii\base\Object
__get() Returns the value of a component property. yii\base\Component
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Component
__set() Sets the value of a component property. yii\base\Component
__unset() Sets a component property to be null. yii\base\Component
add() Adds a role, permission or rule to the RBAC system. yii\rbac\BaseManager
addChild() Adds an item as a child of another item. yii\rbac\DbManager
assign() Assigns a role to a user. yii\rbac\DbManager
attachBehavior() Attaches a behavior to this component. yii\base\Component
attachBehaviors() Attaches a list of behaviors to the component. yii\base\Component
behaviors() Returns a list of behaviors that this component should behave as. yii\base\Component
canAddChild() Checks the possibility of adding a child to parent yii\rbac\DbManager
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Component
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Component
checkAccess() yii\rbac\DbManager
className() Returns the fully qualified name of this class. yii\base\Object
createPermission() Creates a new Permission object. yii\rbac\BaseManager
createRole() Creates a new Role object. yii\rbac\BaseManager
detachBehavior() Detaches a behavior from the component. yii\base\Component
detachBehaviors() Detaches all behaviors from the component. yii\base\Component
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component. yii\base\Component
getAssignment() Returns the assignment information regarding a role and a user. yii\rbac\DbManager
getAssignments() Returns all role assignment information for the specified user. yii\rbac\DbManager
getBehavior() Returns the named behavior object. yii\base\Component
getBehaviors() Returns all behaviors attached to this component. yii\base\Component
getChildRoles() Returns child roles of the role specified. Depth isn't limited. yii\rbac\DbManager
getChildren() Returns the child permissions and/or roles. yii\rbac\DbManager
getDefaultRoleInstances() Returns defaultRoles as array of Role objects yii\rbac\BaseManager
getParents() lispa\amos\core\rbac\AuthManager
getPermission() Returns the named permission. yii\rbac\BaseManager
getPermissions() Returns all permissions in the system. yii\rbac\BaseManager
getPermissionsByRole() Returns all permissions that the specified role represents. yii\rbac\DbManager
getPermissionsByUser() Returns all permissions that the user has. yii\rbac\DbManager
getRole() Returns the named role. yii\rbac\BaseManager
getRoles() Returns all roles in the system. yii\rbac\BaseManager
getRolesByUser() Returns the roles that are assigned to the user via assign(). yii\rbac\DbManager
getRule() Returns the rule of the specified name. yii\rbac\DbManager
getRules() Returns all rules available in the system. yii\rbac\DbManager
getUserIdsByRole() lispa\amos\core\rbac\AuthManager
getUserIdsByRoleDirectlyAssigned() lispa\amos\core\rbac\AuthManager
hasChild() Returns a value indicating whether the child already exists for the parent. yii\rbac\DbManager
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event. yii\base\Component
hasMethod() Returns a value indicating whether a method is defined. yii\base\Component
hasProperty() Returns a value indicating whether a property is defined for this component. yii\base\Component
init() Initializes the application component. yii\rbac\DbManager
invalidateCache() yii\rbac\DbManager
loadFromCache() yii\rbac\DbManager
off() Detaches an existing event handler from this component. yii\base\Component
on() Attaches an event handler to an event. yii\base\Component
remove() Removes a role, permission or rule from the RBAC system. yii\rbac\BaseManager
removeAll() Removes all authorization data, including roles, permissions, rules, and assignments. yii\rbac\DbManager
removeAllAssignments() Removes all role assignments. yii\rbac\DbManager
removeAllPermissions() Removes all permissions. yii\rbac\DbManager
removeAllRoles() Removes all roles. yii\rbac\DbManager
removeAllRules() Removes all rules. yii\rbac\DbManager
removeChild() Removes a child from its parent. yii\rbac\DbManager
removeChildren() Removed all children form their parent. yii\rbac\DbManager
revoke() Revokes a role from a user. yii\rbac\DbManager
revokeAll() Revokes all roles from a user. yii\rbac\DbManager
trigger() Triggers an event. yii\base\Component
update() Updates the specified role, permission or rule in the system. yii\rbac\BaseManager

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
addItem() Adds an auth item to the RBAC system. yii\rbac\DbManager
addRule() Adds a rule to the RBAC system. yii\rbac\DbManager
checkAccessFromCache() Performs access check for the specified user based on the data loaded from cache. yii\rbac\DbManager
checkAccessRecursive() Performs access check for the specified user. yii\rbac\DbManager
detectLoop() Checks whether there is a loop in the authorization item hierarchy. yii\rbac\DbManager
executeRule() Executes the rule associated with the specified auth item. yii\rbac\BaseManager
getChildrenList() Returns the children for every parent. yii\rbac\DbManager
getChildrenRecursive() Recursively finds all children and grand children of the specified item. yii\rbac\DbManager
getDirectPermissionsByUser() Returns all permissions that are directly assigned to user. yii\rbac\DbManager
getInheritedPermissionsByUser() Returns all permissions that the user inherits from the roles assigned to him. yii\rbac\DbManager
getItem() Returns the named auth item. yii\rbac\DbManager
getItems() Returns the items of the specified type. yii\rbac\DbManager
hasNoAssignments() Checks whether array of $assignments is empty and $defaultRoles property is empty as well yii\rbac\BaseManager
populateItem() Populates an auth item with the data fetched from database yii\rbac\DbManager
removeAllItems() Removes all auth items of the specified type. yii\rbac\DbManager
removeItem() Removes an auth item from the RBAC system. yii\rbac\DbManager
removeRule() Removes a rule from the RBAC system. yii\rbac\DbManager
supportsCascadeUpdate() Returns a value indicating whether the database supports cascading update and delete. yii\rbac\DbManager
updateItem() Updates an auth item in the RBAC system. yii\rbac\DbManager
updateRule() Updates a rule to the RBAC system. yii\rbac\DbManager

Method Details

getParents() public method

public array getParents ( $roleName )
$roleName string
getUserIdsByRole() public method

public array|string[] getUserIdsByRole ( $roleName )
$roleName string
getUserIdsByRoleDirectlyAssigned() public method

public array|string[] getUserIdsByRoleDirectlyAssigned ( $roleName )
$roleName string