-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathconstants.ts
More file actions
24 lines (22 loc) · 845 Bytes
/
constants.ts
File metadata and controls
24 lines (22 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
export const USER = 'user' as const;
export const SUPERVISOR = 'supervisor' as const;
export const SUPERVISORWITHOUTPERMISSION = 'supervisor_without_permissions' as const;
export const ADMIN = 'admin' as const;
export const SUPERADMIN = 'superadmin' as const;
export const PRODUCTS_FIND = 'products:find' as const;
export const PRODUCTS_EDIT = 'products:edit' as const;
export const PRODUCTS_DELETE = 'products:delete' as const;
export const PRODUCTS_UPDATE = 'products:update' as const;
export const PRODUCTS_CREATE = 'products:create' as const;
export type RoleName =
| typeof USER
| typeof SUPERVISOR
| typeof SUPERVISORWITHOUTPERMISSION
| typeof ADMIN
| typeof SUPERADMIN;
export type Operation =
| typeof PRODUCTS_FIND
| typeof PRODUCTS_EDIT
| typeof PRODUCTS_DELETE
| typeof PRODUCTS_UPDATE
| typeof PRODUCTS_CREATE;