mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 07:35:09 +00:00
feat(rbac): made changes from testing with maidul
This commit is contained in:
@@ -15,40 +15,16 @@ export type TRole<T extends string | undefined> = {
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type TPermission = TWorkspacePermission | TGeneralPermission;
|
||||
|
||||
type TGeneralPermission = {
|
||||
export type TPermission = {
|
||||
conditions?: Record<string, any>;
|
||||
action: "read" | "edit" | "create" | "delete";
|
||||
subject: "member" | "role" | "incident-contact" | "sso" | "billing" | "settings";
|
||||
action: string;
|
||||
subject: string;
|
||||
};
|
||||
|
||||
type TWorkspacePermission = {
|
||||
export type TProjectPermission = {
|
||||
conditions?: Record<string, any>;
|
||||
action: "read" | "create";
|
||||
subject: "workspace";
|
||||
};
|
||||
|
||||
export type TProjectPermission = TProjectGeneralPermission | TProjectWorkspacePermission;
|
||||
|
||||
type TProjectGeneralPermission = {
|
||||
conditions?: Record<string, any>;
|
||||
action: "read" | "edit" | "create" | "delete";
|
||||
subject:
|
||||
| "member"
|
||||
| "role"
|
||||
| "settings"
|
||||
| "secrets"
|
||||
| "environments"
|
||||
| "folders"
|
||||
| "secret-imports"
|
||||
| "service-tokens";
|
||||
};
|
||||
|
||||
type TProjectWorkspacePermission = {
|
||||
conditions?: Record<string, any>;
|
||||
action: "delete" | "edit";
|
||||
subject: "workspace";
|
||||
action: string;
|
||||
subject: string;
|
||||
};
|
||||
|
||||
export type TCreateRoleDTO<T extends string | undefined> = {
|
||||
|
||||
Reference in New Issue
Block a user