mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 10:35:17 +00:00
feat(rbac): fixed merge conflicts and resolved some more issues with permission checks
This commit is contained in:
@@ -6,7 +6,6 @@ import { MembershipNotFoundError } from "../utils/errors";
|
||||
import { AuthData } from "../interfaces/middleware";
|
||||
import { ActorType } from "../ee/models";
|
||||
import { z } from "zod";
|
||||
import { ADMIN, CUSTOM, MEMBER, VIEWER } from "../variables";
|
||||
|
||||
/**
|
||||
* Validate authenticated clients for membership with id [membershipId] based
|
||||
@@ -66,7 +65,7 @@ export const DeleteMembershipV1 = z.object({
|
||||
|
||||
export const ChangeMembershipRoleV1 = z.object({
|
||||
body: z.object({
|
||||
role: z.enum([ADMIN, VIEWER, MEMBER, CUSTOM])
|
||||
role: z.string().trim()
|
||||
}),
|
||||
params: z.object({ membershipId: z.string().trim() })
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ export const CreateRoleSchema = z.object({
|
||||
.object({
|
||||
subject: z.string(),
|
||||
action: z.string(),
|
||||
condition: z.record(z.union([z.string(), z.number()])).optional()
|
||||
conditions: z.record(z.union([z.string(), z.number()])).optional()
|
||||
})
|
||||
.array()
|
||||
})
|
||||
@@ -31,7 +31,7 @@ export const UpdateRoleSchema = z.object({
|
||||
.object({
|
||||
subject: z.string(),
|
||||
action: z.string(),
|
||||
condition: z.record(z.union([z.string(), z.number()])).optional()
|
||||
conditions: z.record(z.union([z.string(), z.number()])).optional()
|
||||
})
|
||||
.array()
|
||||
.optional()
|
||||
|
||||
Reference in New Issue
Block a user