All files / src/constants roles.ts

100% Statements 17/17
100% Branches 2/2
100% Functions 1/1
100% Lines 17/17

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 391x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x   1x             1x   1x   1x 1x                     1x  
export enum Role {
  PUBLIC = 0,
  ADMIN = 1,
  SALES = 2,
  DESIGNER = 3,
  SUPPLIER = 4,
  CLIENT = 5,
  MANAGER = 6,
  ACCOUNTANT = 7,
  THEME_EDITOR = 8,
}
 
export const DOMAIN_MANAGERS = [Role.ADMIN, Role.MANAGER];
 
export const MANAGEMENT_TEAM = [
  ...DOMAIN_MANAGERS,
  Role.SALES,
  Role.DESIGNER,
  Role.ACCOUNTANT,
];
 
export const BUSINESS_ACCOUNTS = [...MANAGEMENT_TEAM, Role.SUPPLIER];
 
export const MANAGEMENT_ROLES = [Role.ADMIN, Role.MANAGER];
 
export const THEME_ROLES = [...MANAGEMENT_ROLES, Role.THEME_EDITOR];
export const ROLES_RANK = [
  Role.PUBLIC,
  Role.CLIENT,
  Role.ACCOUNTANT,
  Role.SALES,
  Role.DESIGNER,
  Role.SUPPLIER,
  Role.MANAGER,
  Role.ADMIN,
];
 
export const ALL_ROLES = ROLES_RANK;