Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix commit permissioning issue on dashboard button

Carlos Monastyrski4e51d56114ea
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
index f92b761a14..a6ae7be628 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
@@ -29,6 +29,7 @@ import {
useWorkspace
} from "@app/context";
import {
+ ProjectPermissionCommitsActions,
ProjectPermissionSecretActions,
ProjectPermissionSecretRotationActions
} from "@app/context/ProjectPermissionContext/types";
@@ -213,6 +214,11 @@ const Page = () => {
ProjectPermissionSub.SecretRollback
);
+ const canReadCommits = permission.can(
+ ProjectPermissionCommitsActions.Read,
+ ProjectPermissionSub.Commits
+ );
+
const defaultFilterState = {
tags: {},
searchFilter: (routerQueryParams.search as string) || "",
@@ -377,7 +383,7 @@ const Page = () => {
directory: secretPath,
workspaceId,
environment,
- isPaused: !canDoReadRollback
+ isPaused: !canReadCommits
});
const {