Skip to content

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

Improve style

x032205902a0b0c5634
diff --git a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
index a5e3533c0a..d4b44902f1 100644
--- a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
@@ -351,25 +351,16 @@ export const AllProjectView = ({
<span>Joined</span>
</Badge>
) : (
- <div className="flex gap-2 opacity-0 transition-all group-hover:opacity-100">
- <Button
- size="xs"
- variant="outline_bg"
- onClick={() => handlePopUpOpen("requestAccessConfirmation", workspace)}
- >
- Request Access
- </Button>
-
+ <div className="opacity-0 transition-all group-hover:opacity-100">
<OrgPermissionCan
I={OrgPermissionAdminConsoleAction.AccessAllProjects}
an={OrgPermissionSubjects.AdminConsole}
>
{(isAllowed) =>
- isAllowed && (
+ isAllowed ? (
<Button
size="xs"
- variant="star"
- colorSchema="primary"
+ variant="outline_bg"
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
@@ -382,6 +373,14 @@ export const AllProjectView = ({
>
Admin Access
</Button>
+ ) : (
+ <Button
+ size="xs"
+ variant="outline_bg"
+ onClick={() => handlePopUpOpen("requestAccessConfirmation", workspace)}
+ >
+ Request Access
+ </Button>
)
}
</OrgPermissionCan>