mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: removed secret path check in glob
This commit is contained in:
@@ -180,10 +180,7 @@ const SECRET_PATH_PERMISSION_OPERATOR_SCHEMA = z.union([
|
||||
(val) => val.every((el) => el.startsWith("/")),
|
||||
SECRET_PATH_MISSING_SLASH_ERR_MSG
|
||||
),
|
||||
[PermissionConditionOperators.$GLOB]: PermissionConditionSchema[PermissionConditionOperators.$GLOB].refine(
|
||||
(val) => val.startsWith("/"),
|
||||
SECRET_PATH_MISSING_SLASH_ERR_MSG
|
||||
)
|
||||
[PermissionConditionOperators.$GLOB]: PermissionConditionSchema[PermissionConditionOperators.$GLOB]
|
||||
})
|
||||
.partial()
|
||||
]);
|
||||
|
||||
@@ -84,7 +84,9 @@ const ConditionSchema = z
|
||||
.refine(
|
||||
(val) =>
|
||||
val
|
||||
.filter((el) => el.lhs === "secretPath")
|
||||
.filter(
|
||||
(el) => el.lhs === "secretPath" && el.operator !== PermissionConditionOperators.$GLOB
|
||||
)
|
||||
.every((el) =>
|
||||
el.operator === PermissionConditionOperators.$IN
|
||||
? el.rhs.split(",").every((i) => i.trim().startsWith("/"))
|
||||
|
||||
Reference in New Issue
Block a user