feat: added validation for secret name to disallow spaces and overview page fix for folder creation

This commit is contained in:
=
2025-01-10 02:00:39 +05:30
parent 01534c3525
commit 8054d93851
2 changed files with 24 additions and 11 deletions
@@ -340,7 +340,14 @@ export const OverviewPage = () => {
const pathSegment = secretPath.split("/").filter(Boolean);
const parentPath = `/${pathSegment.slice(0, -1).join("/")}`;
const folderName = pathSegment.at(-1);
if (folderName && parentPath) {
const canCreateFolder = permission.can(
ProjectPermissionActions.Create,
subject(ProjectPermissionSub.SecretFolders, {
environment: env,
secretPath: parentPath
})
);
if (folderName && parentPath && canCreateFolder) {
await createFolder({
projectId: workspaceId,
path: parentPath,