Răsfoiți Sursa

Extended typing to auth module

jnfrati 4 ani în urmă
părinte
comite
392940f003
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      dashboard/src/shared/auth/types.ts

+ 5 - 2
dashboard/src/shared/auth/types.ts

@@ -3,14 +3,17 @@ export type ScopeType =
   | "cluster"
   | "cluster"
   | "settings"
   | "settings"
   | "namespace"
   | "namespace"
-  | "application";
+  | "application"
+  | "env_group"
+  | "job"
+  | "integrations";
 
 
 export type Verbs = "get" | "list" | "create" | "update" | "delete";
 export type Verbs = "get" | "list" | "create" | "update" | "delete";
 
 
 export interface PolicyDocType {
 export interface PolicyDocType {
   scope: ScopeType;
   scope: ScopeType;
   verbs: Array<Verbs>;
   verbs: Array<Verbs>;
-  resources: string[];
+  resources?: string[];
   children?: Partial<Record<ScopeType, PolicyDocType>>;
   children?: Partial<Record<ScopeType, PolicyDocType>>;
 }
 }