rbac\DbManager checkAccessFromCache()

checkAccessFromCache() protected method (available since version 2.0.3) 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

rbac\DbManager 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

rbac\DbManager assign()

assign() public method Assigns a role to a user. public yii\rbac\Assignment assign ( $role, $userId )$role yii\rbac\Role $userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Assignment The role assignment information. throws Exception if the role has already been assigned to the user

rbac\DbManager checkAccess()

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

rbac\DbManager canAddChild()

canAddChild() public method (available since version 2.0.8) 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

rbac\DbManager addItem()

addItem() protected method Adds an auth item to the RBAC system. protected boolean addItem ( $item )$item yii\rbac\Item The item to add return boolean Whether the auth item is successfully added to the system throws Exception if data validation or saving fails (such as the name of the role or permission is not unique)

rbac\DbManager addRule()

addRule() protected method Adds a rule to the RBAC system. protected boolean addRule ( $rule )$rule yii\rbac\Rule The rule to add return boolean Whether the rule is successfully added to the system throws Exception if data validation or saving fails (such as the name of the rule is not unique)

rbac\DbManager addChild()

addChild() public method Adds an item as a child of another item. public boolean addChild ( $parent, $child )$parent yii\rbac\Item $child yii\rbac\Item return boolean Whether the child successfully added throws yii\base\Exception if the parent-child relationship already exists or if a loop has been detected.

rbac\DbManager $rules

$rules protected read-only property All auth rules (name => Rule) public yii\rbac\Rule[] getRules ( )

rbac\DbManager $ruleTable

$ruleTable public property The name of the table storing rules. Defaults to "auth_rule". public string $ruleTable = '{{%auth_rule}}'