Adrià Vilanova MartÃnez | 5dd7a6f | 2023-03-04 18:32:27 +0100 | [diff] [blame] | 1 | export const kUserRoleEnum = { |
| 2 | ROLE_USER: 0, |
| 3 | ROLE_PRODUCT_EXPERT_LEVEL_1: 1, |
| 4 | ROLE_PRODUCT_EXPERT_LEVEL_2: 2, |
| 5 | ROLE_PRODUCT_EXPERT_LEVEL_3: 3, |
| 6 | ROLE_PRODUCT_EXPERT_LEVEL_4: 4, |
| 7 | ROLE_PRODUCT_EXPERT_LEVEL_5: 5, |
| 8 | ROLE_COMMUNITY_MANAGER: 10, |
| 9 | ROLE_COMMUNITY_SPECIALIST: 20, |
| 10 | ROLE_GOOGLE_EMPLOYEE: 100, |
| 11 | ROLE_ALUMNUS: 30, |
| 12 | }; |
| 13 | export default kUserRoleEnum; |
| 14 | |
| 15 | export let kUserRoleRank = {}; |
| 16 | kUserRoleRank[kUserRoleEnum.ROLE_USER] = 0; |
| 17 | kUserRoleRank[kUserRoleEnum.ROLE_ALUMNUS] = 1; |
| 18 | kUserRoleRank[kUserRoleEnum.ROLE_PRODUCT_EXPERT_LEVEL_1] = 2; |
| 19 | kUserRoleRank[kUserRoleEnum.ROLE_PRODUCT_EXPERT_LEVEL_2] = 3; |
| 20 | kUserRoleRank[kUserRoleEnum.ROLE_PRODUCT_EXPERT_LEVEL_3] = 4; |
| 21 | kUserRoleRank[kUserRoleEnum.ROLE_PRODUCT_EXPERT_LEVEL_4] = 5; |
| 22 | kUserRoleRank[kUserRoleEnum.ROLE_PRODUCT_EXPERT_LEVEL_5] = 6; |
| 23 | kUserRoleRank[kUserRoleEnum.ROLE_COMMUNITY_SPECIALIST] = 7; |
| 24 | kUserRoleRank[kUserRoleEnum.ROLE_COMMUNITY_MANAGER] = 8; |
| 25 | kUserRoleRank[kUserRoleEnum.ROLE_GOOGLE_EMPLOYEE] = 9; |