mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 22:28:15 +00:00
feat(secret-import): added workspace validation for get imports and imported secret api
This commit is contained in:
@@ -54,6 +54,10 @@ router.get(
|
|||||||
requireAuth({
|
requireAuth({
|
||||||
acceptedAuthModes: [AUTH_MODE_JWT]
|
acceptedAuthModes: [AUTH_MODE_JWT]
|
||||||
}),
|
}),
|
||||||
|
requireWorkspaceAuth({
|
||||||
|
acceptedRoles: [ADMIN, MEMBER],
|
||||||
|
locationWorkspaceId: "query"
|
||||||
|
}),
|
||||||
query("workspaceId").exists().isString().trim().notEmpty(),
|
query("workspaceId").exists().isString().trim().notEmpty(),
|
||||||
query("environment").exists().isString().trim().notEmpty(),
|
query("environment").exists().isString().trim().notEmpty(),
|
||||||
query("folderId").default("root").isString().trim(),
|
query("folderId").default("root").isString().trim(),
|
||||||
@@ -66,6 +70,10 @@ router.get(
|
|||||||
requireAuth({
|
requireAuth({
|
||||||
acceptedAuthModes: [AUTH_MODE_JWT]
|
acceptedAuthModes: [AUTH_MODE_JWT]
|
||||||
}),
|
}),
|
||||||
|
requireWorkspaceAuth({
|
||||||
|
acceptedRoles: [ADMIN, MEMBER],
|
||||||
|
locationWorkspaceId: "query"
|
||||||
|
}),
|
||||||
query("workspaceId").exists().isString().trim().notEmpty(),
|
query("workspaceId").exists().isString().trim().notEmpty(),
|
||||||
query("environment").exists().isString().trim().notEmpty(),
|
query("environment").exists().isString().trim().notEmpty(),
|
||||||
query("folderId").default("root").isString().trim(),
|
query("folderId").default("root").isString().trim(),
|
||||||
|
|||||||
Reference in New Issue
Block a user