A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.yiiframework.com/doc/api/2.0/yii-rbac-managerinterface below:

ManagerInterface, yii\rbac\ManagerInterface | API Documentation for Yii 2.0

Interface yii\rbac\ManagerInterface

For more details and usage information on ManagerInterface, see the guide article on security authorization.

Method Details

Hide inherited methods

Adds a role, permission or rule to the RBAC system.

Source code

                public function add($object);

            

Adds an item as a child of another item.

Source code

                public function addChild($parent, $child);

            

Assigns a role to a user.

Source code

                public function assign($role, $userId);

            

Checks the possibility of adding a child to parent.

Source code

                public function canAddChild($parent, $child);

            
public abstract boolean checkAccess ( $userId, $permissionName, $params = [] ) $userId string|integer

The user ID. This should be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id.

$permissionName string

The name of the permission to be checked against

$params array

Name-value pairs that will be passed to the rules associated with the roles and permissions assigned to the user.

return boolean

Whether the user has the specified permission.

throws yii\base\InvalidParamException

if $permissionName does not refer to an existing permission

Source code

                public function checkAccess($userId, $permissionName, $params = []);

            

Creates a new Permission object.

Note that the newly created permission is not added to the RBAC system yet. You must fill in the needed data and call add() to add it to the system.

Source code

                public function createPermission($name);

            

Creates a new Role object.

Note that the newly created role is not added to the RBAC system yet. You must fill in the needed data and call add() to add it to the system.

Source code

                public function createRole($name);

            

Returns the assignment information regarding a role and a user.

Source code

                public function getAssignment($roleName, $userId);

            

Returns all role assignment information for the specified user.

Source code

                public function getAssignments($userId);

            

Returns child roles of the role specified. Depth isn't limited.

Source code

                public function getChildRoles($roleName);

            

Returns the child permissions and/or roles.

Source code

                public function getChildren($name);

            

Returns the named permission.

Source code

                public function getPermission($name);

            

Returns all permissions in the system.

Source code

                public function getPermissions();

            

Returns all permissions that the specified role represents.

Source code

                public function getPermissionsByRole($roleName);

            

Returns all permissions that the user has.

Source code

                public function getPermissionsByUser($userId);

            

Returns the named role.

Source code

                public function getRole($name);

            

Returns all roles in the system.

Source code

                public function getRoles();

            

Returns the roles that are assigned to the user via assign().

Note that child roles that are not assigned directly to the user will not be returned.

Source code

                public function getRolesByUser($userId);

            

Returns the rule of the specified name.

Source code

                public function getRule($name);

            

Returns all rules available in the system.

Source code

                public function getRules();

            

Returns all user IDs assigned to the role specified.

Source code

                public function getUserIdsByRole($roleName);

            

Returns a value indicating whether the child already exists for the parent.

Source code

                public function hasChild($parent, $child);

            

Removes a role, permission or rule from the RBAC system.

Source code

                public function remove($object);

            

Removes all authorization data, including roles, permissions, rules, and assignments.

Source code

                public function removeAll();

            

Removes all role assignments.

Source code

                public function removeAllAssignments();

            

Removes all permissions.

All parent child relations will be adjusted accordingly.

Source code

                public function removeAllPermissions();

            

Removes all roles.

All parent child relations will be adjusted accordingly.

Source code

                public function removeAllRoles();

            

Removes all rules.

All roles and permissions which have rules will be adjusted accordingly.

Source code

                public function removeAllRules();

            

Removes a child from its parent.

Note, the child item is not deleted. Only the parent-child relationship is removed.

Source code

                public function removeChild($parent, $child);

            

Removed all children form their parent.

Note, the children items are not deleted. Only the parent-child relationships are removed.

Source code

                public function removeChildren($parent);

            

Revokes a role from a user.

Source code

                public function revoke($role, $userId);

            

Revokes all roles from a user.

Source code

                public function revokeAll($userId);

            

Updates the specified role, permission or rule in the system.

Source code

                public function update($name, $object);

            

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4