Skip to content

Commit 7664203

Browse files
committed
fix(project-selection): change permission level sleect to use administrator instead of owner
1 parent 548c570 commit 7664203

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/userContext/filter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import type { ProjectDetail } from "@squonk/data-manager-client";
22

3+
export const PERMISSION_LEVELS = ["none", "editor", "administrator"] as const;
4+
35
export const isAPermissionLevel = (value: string): value is PermissionLevel => {
46
return (PERMISSION_LEVELS as unknown as string[]).includes(value);
57
};
68

7-
export const PERMISSION_LEVELS = ["none", "editor", "owner"] as const;
89
export type PermissionLevel = (typeof PERMISSION_LEVELS)[number];
910
export type PermissionLevelFilter =
1011
| [level: PermissionLevel, user: string]
@@ -26,7 +27,7 @@ export const filterProjectsByPermissionLevel = (
2627
(project) => project.editors.includes(user) || project.administrators.includes(user),
2728
);
2829

29-
case "owner":
30+
case "administrator":
3031
return projects.filter((project) => project.administrators.includes(user));
3132

3233
default:

0 commit comments

Comments
 (0)