Make employee role assignable
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -9,11 +9,11 @@ export type Role = (typeof Role)[keyof typeof Role];
|
||||
|
||||
export function getAssignableRoles(currentRole: Role): Role[] {
|
||||
if (currentRole === Role.OWNER) {
|
||||
return [Role.OWNER, Role.ADMIN, Role.VIEWER];
|
||||
return [Role.OWNER, Role.ADMIN, Role.VIEWER, Role.EMPLOYEE];
|
||||
}
|
||||
|
||||
if (currentRole === Role.ADMIN) {
|
||||
return [Role.ADMIN, Role.VIEWER];
|
||||
return [Role.ADMIN, Role.VIEWER, Role.EMPLOYEE];
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user