File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { ProjectDetail } from "@squonk/data-manager-client" ;
2
2
3
+ export const PERMISSION_LEVELS = [ "none" , "editor" , "administrator" ] as const ;
4
+
3
5
export const isAPermissionLevel = ( value : string ) : value is PermissionLevel => {
4
6
return ( PERMISSION_LEVELS as unknown as string [ ] ) . includes ( value ) ;
5
7
} ;
6
8
7
- export const PERMISSION_LEVELS = [ "none" , "editor" , "owner" ] as const ;
8
9
export type PermissionLevel = ( typeof PERMISSION_LEVELS ) [ number ] ;
9
10
export type PermissionLevelFilter =
10
11
| [ level : PermissionLevel , user : string ]
@@ -26,7 +27,7 @@ export const filterProjectsByPermissionLevel = (
26
27
( project ) => project . editors . includes ( user ) || project . administrators . includes ( user ) ,
27
28
) ;
28
29
29
- case "owner " :
30
+ case "administrator " :
30
31
return projects . filter ( ( project ) => project . administrators . includes ( user ) ) ;
31
32
32
33
default :
You can’t perform that action at this time.
0 commit comments