@upv/ushi-shared
Version:
Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).
34 lines (33 loc) • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RoleRegistry = void 0;
const enums_1 = require("../../enums");
/**
* RoleRegistry
*
* Maps each RoleDomain to the valid PersonRole[] values allowed in that domain.
* This is used for validation, UI dropdowns, and system-wide role management.
*/
exports.RoleRegistry = {
[enums_1.RoleDomain.GLOBAL]: [
enums_1.PersonRole.ADMIN,
enums_1.PersonRole.RESEARCHER,
enums_1.PersonRole.ORGANIZER,
],
[enums_1.RoleDomain.LMS]: [
enums_1.PersonRole.STUDENT,
enums_1.PersonRole.CREATOR,
enums_1.PersonRole.COACH,
enums_1.PersonRole.ADMIN,
],
[enums_1.RoleDomain.SOCIAL]: [
enums_1.PersonRole.MODERATOR,
enums_1.PersonRole.CREATOR,
enums_1.PersonRole.COACH,
],
[enums_1.RoleDomain.TRIAL]: [
enums_1.PersonRole.PARTICIPANT,
enums_1.PersonRole.RESEARCHER,
enums_1.PersonRole.ORGANIZER,
],
};