Skip to content

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

feat(rbac): changed withpermission hoc text and removed loading on overview pageg

Akhil Mohan8003273b2cff
diff --git a/frontend/src/hoc/withPermission/withPermission.tsx b/frontend/src/hoc/withPermission/withPermission.tsx
index 520ccff295..870c54f813 100644
--- a/frontend/src/hoc/withPermission/withPermission.tsx
+++ b/frontend/src/hoc/withPermission/withPermission.tsx
@@ -43,10 +43,10 @@ export const withPermission = <T extends {}, J extends TOrgPermission>(
<FontAwesomeIcon icon={faLock} size="6x" />
</div>
<div>
- <div className="text-4xl font-medium mb-2">Permission Denied</div>
+ <div className="text-4xl font-medium mb-2">Access Restricted</div>
<div className="text-sm">
- You do not have permission to this page. <br /> Kindly contact your organization
- administrator
+ Your role has limited permissions, please <br /> You do not have permission to this
+ page.
</div>
</div>
</div>
diff --git a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx
index ff3af03eab..b5fa1dc1bc 100644
--- a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx
+++ b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx
@@ -243,6 +243,8 @@ export const SecretOverviewPage = () => {
folders?.some(({ isLoading }) => !isLoading) && secrets?.some(({ isLoading }) => !isLoading)
);
+ const canViewOverviewPage = Boolean(userAvailableEnvs.length);
+
const filteredSecretNames = secKeys
?.filter((name) => name.toUpperCase().includes(searchFilter.toUpperCase()))
.sort((a, b) => (sortDir === "asc" ? a.localeCompare(b) : b.localeCompare(a)));
@@ -347,7 +349,7 @@ export const SecretOverviewPage = () => {
</Tr>
</THead>
<TBody>
- {isTableLoading && (
+ {canViewOverviewPage && isTableLoading && (
<TableSkeleton
columns={userAvailableEnvs.length + 1}
innerKey="secret-overview-loading"