Make employee role assignable

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-12-09 17:28:13 +01:00
parent b758221bc4
commit c355f1c307
3 changed files with 11 additions and 3 deletions

View File

@@ -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 [];