Skip to main content

create_group(group_name, group_id)

Used to create a new group within the RBAC (Role-Based Access Control) system.

Create Group Code Examples

fetch_group(owner, group_id)

Fetches group information from the RBAC system based on the provided group ID and owner’s address.

Fetch Group Code Examples

fetch_groups(owner)

Used to fetch all the groups associated with the passed owner address.

Fetch Groups Code Examples

update_group(group_id, group_name)

Allows updating the name of an existing group in the RBAC system.

Update Group Code Examples

disable_group(group_id)

Disables a group within the RBAC system. A disabled group cannot be used for new role assignments.

Disable Group Code Examples

assign_role_to_group(group_id, role_id)

Assigns a role to a group in the RBAC system. This grants all members of the group the permissions associated with the role.

Assign Role to Group Code Examples

fetch_group_roles(owner, group_id)

Fetches all roles assigned to a specific group in the RBAC system.

Fetch Group Roles Code Examples

unassign_role_to_group(group_id, role_id)

Removes a role assignment from a group in the RBAC system. This revokes the role’s permissions from all group members.

Unassign Role to Group Code Examples

assign_user_to_group(user_id, group_id)

Assigns a user to a group in the RBAC system. The user will inherit all roles and permissions assigned to the group.

Assign User to Group Code Examples

fetch_user_groups(owner, user_id)

Fetches all groups that a specific user is assigned to in the RBAC system.

Fetch User Groups Code Examples

unassign_user_to_group(user_id, group_id)

Removes a user from a group in the RBAC system. The user will lose all roles and permissions associated with the group.

Unassign User to Group Code Examples