mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 07:27:58 +00:00
feat(rbac): resolved secret import not listing
This commit is contained in:
@@ -275,7 +275,9 @@ export const deleteSecretImport = async (req: Request, res: Response) => {
|
||||
};
|
||||
|
||||
export const getSecretImports = async (req: Request, res: Response) => {
|
||||
const { workspaceId, environment, folderId } = req.query;
|
||||
const {
|
||||
query: { workspaceId, environment, folderId }
|
||||
} = await validateRequest(reqValidator.GetSecretImportsV1, req);
|
||||
const importSecDoc = await SecretImport.findOne({
|
||||
workspace: workspaceId,
|
||||
environment,
|
||||
@@ -325,11 +327,10 @@ export const getSecretImports = async (req: Request, res: Response) => {
|
||||
};
|
||||
|
||||
export const getAllSecretsFromImport = async (req: Request, res: Response) => {
|
||||
const { workspaceId, environment, folderId } = req.query as {
|
||||
workspaceId: string;
|
||||
environment: string;
|
||||
folderId: string;
|
||||
};
|
||||
const {
|
||||
query: { workspaceId, environment, folderId }
|
||||
} = await validateRequest(reqValidator.GetAllSecretsFromImportV1, req);
|
||||
|
||||
const importSecDoc = await SecretImport.findOne({
|
||||
workspace: workspaceId,
|
||||
environment,
|
||||
|
||||
@@ -40,7 +40,7 @@ export const GetSecretImportsV1 = z.object({
|
||||
query: z.object({
|
||||
workspaceId: z.string().trim(),
|
||||
environment: z.string().trim(),
|
||||
folderId: z.string().trim()
|
||||
folderId: z.string().trim().default("root")
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user