mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 04:27:38 +00:00
feat(rbac): changed withpermission hoc text and removed loading on overview pageg
This commit is contained in:
@@ -43,10 +43,10 @@ export const withPermission = <T extends {}, J extends TOrgPermission>(
|
|||||||
<FontAwesomeIcon icon={faLock} size="6x" />
|
<FontAwesomeIcon icon={faLock} size="6x" />
|
||||||
</div>
|
</div>
|
||||||
<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">
|
<div className="text-sm">
|
||||||
You do not have permission to this page. <br /> Kindly contact your organization
|
Your role has limited permissions, please <br /> You do not have permission to this
|
||||||
administrator
|
page.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -243,6 +243,8 @@ export const SecretOverviewPage = () => {
|
|||||||
folders?.some(({ isLoading }) => !isLoading) && secrets?.some(({ isLoading }) => !isLoading)
|
folders?.some(({ isLoading }) => !isLoading) && secrets?.some(({ isLoading }) => !isLoading)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const canViewOverviewPage = Boolean(userAvailableEnvs.length);
|
||||||
|
|
||||||
const filteredSecretNames = secKeys
|
const filteredSecretNames = secKeys
|
||||||
?.filter((name) => name.toUpperCase().includes(searchFilter.toUpperCase()))
|
?.filter((name) => name.toUpperCase().includes(searchFilter.toUpperCase()))
|
||||||
.sort((a, b) => (sortDir === "asc" ? a.localeCompare(b) : b.localeCompare(a)));
|
.sort((a, b) => (sortDir === "asc" ? a.localeCompare(b) : b.localeCompare(a)));
|
||||||
@@ -347,7 +349,7 @@ export const SecretOverviewPage = () => {
|
|||||||
</Tr>
|
</Tr>
|
||||||
</THead>
|
</THead>
|
||||||
<TBody>
|
<TBody>
|
||||||
{isTableLoading && (
|
{canViewOverviewPage && isTableLoading && (
|
||||||
<TableSkeleton
|
<TableSkeleton
|
||||||
columns={userAvailableEnvs.length + 1}
|
columns={userAvailableEnvs.length + 1}
|
||||||
innerKey="secret-overview-loading"
|
innerKey="secret-overview-loading"
|
||||||
|
|||||||
Reference in New Issue
Block a user