mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 04:27:29 +00:00
Fix test case
This commit is contained in:
@@ -473,14 +473,15 @@ export const secretServiceFactory = ({
|
|||||||
|
|
||||||
if (!deepPaths) return { secrets: [], imports: [] };
|
if (!deepPaths) return { secrets: [], imports: [] };
|
||||||
} else {
|
} else {
|
||||||
const folder = await folderDAL.findBySecretPath(projectId, environment, path);
|
|
||||||
if (!folder) return { secrets: [], imports: [] };
|
|
||||||
paths = [{ folderId: folder.id, path }];
|
|
||||||
|
|
||||||
ForbiddenError.from(permission).throwUnlessCan(
|
ForbiddenError.from(permission).throwUnlessCan(
|
||||||
ProjectPermissionActions.Read,
|
ProjectPermissionActions.Read,
|
||||||
subject(ProjectPermissionSub.Secrets, { environment, secretPath: folder.path })
|
subject(ProjectPermissionSub.Secrets, { environment, secretPath: path })
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const folder = await folderDAL.findBySecretPath(projectId, environment, path);
|
||||||
|
if (!folder) return { secrets: [], imports: [] };
|
||||||
|
|
||||||
|
paths = [{ folderId: folder.id, path }];
|
||||||
}
|
}
|
||||||
|
|
||||||
const groupedPaths = groupBy(paths, (p) => p.folderId);
|
const groupedPaths = groupBy(paths, (p) => p.folderId);
|
||||||
|
|||||||
Reference in New Issue
Block a user