System Roles

How to create system roles?

Currently there are no APIs present in UserOrg service to do role management. If any new role needs to be added it is done through DB script.

Sample Script:

insert into sunbird.role (id,name,rolegroupid,status) values ('PROGRAM_MANAGER','Program Manager',['PROGRAM_MANAGER'],1);
insert into sunbird.role_group (id,name) values ('PROGRAM_MANAGER','Program Manager');

DB details:

CREATE TABLE IF NOT EXISTS sunbird.role(id text, name text,roleGroupId List<text>,status int, PRIMARY KEY (id));
CREATE TABLE IF NOT EXISTS sunbird.role_group(id text, name text, PRIMARY KEY (id));

To fetch the roles in the system, below API can be used:

GET /v1/role/read

Role List

Last updated