B2BRBACClient

interface B2BRBACClient

Role-based access control (RBAC) authorization checks for the current member.

Functions

Link copied to clipboard
abstract suspend fun allPermissions(): Map<String, Map<String, Boolean>>

Refreshes the RBAC policy from the server, then returns a map of all permissions for the logged-in member in the form Map<resourceId, Map<action, Boolean>>.

Link copied to clipboard
abstract suspend fun isAuthorized(resourceId: String, action: String): Boolean

Refreshes the RBAC policy from the server, then checks whether the logged-in member is authorized to perform action on resourceId.

Link copied to clipboard
abstract fun isAuthorizedSync(resourceId: String, action: String): Boolean

Checks whether the logged-in member is authorized to perform action on resourceId using the locally cached RBAC policy. No network request is made; returns false if no policy is cached yet.