mongodb\rbac\MongoDbManager getChildRoles()

getChildRoles() public method (available since version 2.1.2) Returns the roles that are adding to the role via addChild() by recursive. public yii\rbac\Role[] getChildRoles ( $roleName )$roleName string Name of parent Role. return yii\rbac\Role[] All roles directly adding to the role. The array is indexed by the role names. First element is a Role item that are getting by $roleName. throws yii\base\InvalidParamException if Role was not found that are getting by $roleName

mongodb\rbac\MongoDbManager getAssignments()

getAssignments() public method Returns all role assignment information for the specified user. public yii\rbac\Assignment[] getAssignments ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Assignment[] The assignments indexed by role names. An empty array will be returned if there is no role assigned to the user.

mongodb\rbac\MongoDbManager getChildrenList()

getChildrenList() protected method Returns the children for every parent. protected array getChildrenList ( )return array The children list. Each array key is a parent item name, and the corresponding array value is a list of child item names.

mongodb\rbac\MongoDbManager getChildren()

getChildren() public method Returns the child permissions and/or roles. public yii\rbac\Item[] getChildren ( $name )$name string The parent name return yii\rbac\Item[] The child permissions and/or roles

mongodb\rbac\MongoDbManager checkAccessRecursive()

checkAccessRecursive() protected method Performs access check for the specified user. This method is internally called by checkAccess(). protected boolean checkAccessRecursive ( $user, $itemName, $params, $assignments )$user string|integer The user ID. This should can be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id. $itemName string The name of the operation that need access check $params array Name-value pairs that would be pass

mongodb\rbac\MongoDbManager getAssignment()

getAssignment() public method Returns the assignment information regarding a role and a user. public null|yii\rbac\Assignment getAssignment ( $roleName, $userId )$roleName string The role name $userId string|integer The user ID (see yii\web\User::$id) return null|yii\rbac\Assignment The assignment information. Null is returned if the role is not assigned to the user.

mongodb\rbac\MongoDbManager detectLoop()

detectLoop() protected method Checks whether there is a loop in the authorization item hierarchy. protected boolean detectLoop ( $parent, $child )$parent yii\rbac\Item The parent item $child yii\rbac\Item The child item to be added to the hierarchy return boolean Whether a loop exists

mongodb\rbac\MongoDbManager checkAccessFromCache()

checkAccessFromCache() protected method Performs access check for the specified user based on the data loaded from cache. This method is internally called by checkAccess() when $cache is enabled. protected boolean checkAccessFromCache ( $user, $itemName, $params, $assignments )$user string|integer The user ID. This should can be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id. $itemName string The name of the operation that need acces

mongodb\rbac\MongoDbManager checkAccess()

checkAccess() public method public void checkAccess ( $userId, $permissionName, $params = [] )$userId $permissionName $params

mongodb\rbac\MongoDbManager canAddChild()

canAddChild() public method Checks the possibility of adding a child to parent public boolean canAddChild ( $parent, $child )$parent yii\rbac\Item The parent item $child yii\rbac\Item The child item to be added to the hierarchy return boolean Possibility of adding