Skip to main content
Version: 1.0.0

getRoles

To get the available roles, you can use the following function:

ISyncedRole[] roles = permit.cache.getRoles();
// returns your org roles with list of ISyncedRole[] type
// [{
// id: string,
// name: string,
// description: string,
// permissions: string[],
// metadata: Dictionary<string, object>,
// },
// ...
// }