Skip to main content

createPermission(permissionName, permissionId, address, seed)

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

Create Permission Code Examples

The EVM tx returns in a different form than what was used throughout the sdk. The purpose of this is to show the permission-id that was autogenerated if it was not manually set. That way you are able to take note of the permission-id for that permission-name set.

fetchPermission(owner, permissionId, wssBaseUrl)

Fetch a permission at the given permissionId and address.

Fetch Group Code Examples

fetchPermissions(owner, wssBaseUrl)

Used to fetch all the permissions associated with the passed owner address

Fetch Permissions Code Examples

updatePermission(permissionName, permissionId, address, seed)

Allows the owner to update the permission name.

Update Permission Code Examples

disablePermission(permissionId, address, seed)

Disables a permission within a permission management system.

Disable Permission Code Examples

assignPermissionToRole(permissionId, roleId, address, seed)

This function allows you to assign a permission to a role in a permission management system.

Assign Permission to Role Code Examples

fetchRolePermissions(owner, roleId, wssBaseUrl)

Designed to retrieve permissions associated with a specific role.

Fetch Role Permissions Code Examples

unassignPermissionToRole(permissionId, roleId, address, seed)

This function allows you to unassign a permission from a role in a permission management system.

Unassign Permission from Role Code Examples

fetchUserPermission(owner, userId, wssBaseUrl)

Fetches the permissions associated with a user. In order to fetch a user permission the following flow must take place:
  1. Create permission
  2. Create role
  3. Assign permission to role
  4. Assign role to user
  5. Fetch user permissions
The following code shows this flow.

Fetch User Permissions Code Examples

fetchGroupPermissions(owner, groupId, wssBaseUrl)

Fetches the permissions associated with a group. In order to fetch a group permission the following flow must take place:
  1. Create permission
  2. Create role
  3. Assign permission to role
  4. Create group
  5. Assign role to group
  6. Fetch group permissions
The following code shows this flow.

Fetch Group Permissions Code Examples