mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 14:26:38 +00:00
rephrase text for permission schema zod
This commit is contained in:
@@ -65,18 +65,27 @@ export const secretRawSchema = z.object({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const PermissionSchema = z.object({
|
export const PermissionSchema = z.object({
|
||||||
action: z.string().min(1).describe("Describe what user can actually do. Ex: create, edit, delete, read"),
|
action: z
|
||||||
subject: z.string().min(1).describe("The entity to check action on. Ex: secrets, environments"),
|
.string()
|
||||||
|
.min(1)
|
||||||
|
.describe("Describe what action an entity can take. Possible actions: create, edit, delete, and read"),
|
||||||
|
subject: z
|
||||||
|
.string()
|
||||||
|
.min(1)
|
||||||
|
.describe("The entity this permission pertains to. Possible options: secrets, environments"),
|
||||||
conditions: z
|
conditions: z
|
||||||
.object({
|
.object({
|
||||||
environment: z.string().describe("To scope the permission to an environment.").optional(),
|
environment: z.string().describe("The environment slug this permission should allow.").optional(),
|
||||||
secretPath: z
|
secretPath: z
|
||||||
.object({
|
.object({
|
||||||
$glob: z.string().min(1).describe("To scope the permission to a secret path. Supports glob patterns.")
|
$glob: z
|
||||||
|
.string()
|
||||||
|
.min(1)
|
||||||
|
.describe("The secret path this permission should allow. Can be a glob pattern such as /folder-name/*/** ")
|
||||||
})
|
})
|
||||||
.optional()
|
.optional()
|
||||||
})
|
})
|
||||||
.describe("Criteria which restricts user action only to matched subjects")
|
.describe("When specified, only matching conditions will be allowed to access given resource.")
|
||||||
.optional()
|
.optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user