Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

rephrase text for permission schema zod

Maidul Islamb3579cb2719e
diff --git a/backend/src/server/routes/sanitizedSchemas.ts b/backend/src/server/routes/sanitizedSchemas.ts
index 04f0a11664..14155ecf99 100644
--- a/backend/src/server/routes/sanitizedSchemas.ts
+++ b/backend/src/server/routes/sanitizedSchemas.ts
@@ -65,18 +65,27 @@ export const secretRawSchema = z.object({
});
export const PermissionSchema = z.object({
- action: z.string().min(1).describe("Describe what user can actually do. Ex: create, edit, delete, read"),
- subject: z.string().min(1).describe("The entity to check action on. Ex: secrets, environments"),
+ action: z
+ .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
.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
.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()
})
- .describe("Criteria which restricts user action only to matched subjects")
+ .describe("When specified, only matching conditions will be allowed to access given resource.")
.optional()
});