Skip to content

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

Make button always show and swap to "Join as Admin"

x032205d5d67c82b20f
diff --git a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
index d4b44902f1..6b1edaf1ff 100644
--- a/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
@@ -351,40 +351,38 @@ export const AllProjectView = ({
<span>Joined</span>
</Badge>
) : (
- <div className="opacity-0 transition-all group-hover:opacity-100">
- <OrgPermissionCan
- I={OrgPermissionAdminConsoleAction.AccessAllProjects}
- an={OrgPermissionSubjects.AdminConsole}
- >
- {(isAllowed) =>
- isAllowed ? (
- <Button
- size="xs"
- variant="outline_bg"
- onClick={(e) => {
- e.stopPropagation();
- e.preventDefault();
- handleAccessProject(workspace.type, workspace.id);
- }}
- disabled={
- orgAdminAccessProject.variables?.projectId === workspace.id &&
- orgAdminAccessProject.isPending
- }
- >
- Admin Access
- </Button>
- ) : (
- <Button
- size="xs"
- variant="outline_bg"
- onClick={() => handlePopUpOpen("requestAccessConfirmation", workspace)}
- >
- Request Access
- </Button>
- )
- }
- </OrgPermissionCan>
- </div>
+ <OrgPermissionCan
+ I={OrgPermissionAdminConsoleAction.AccessAllProjects}
+ an={OrgPermissionSubjects.AdminConsole}
+ >
+ {(isAllowed) =>
+ isAllowed ? (
+ <Button
+ size="xs"
+ variant="outline_bg"
+ onClick={(e) => {
+ e.stopPropagation();
+ e.preventDefault();
+ handleAccessProject(workspace.type, workspace.id);
+ }}
+ disabled={
+ orgAdminAccessProject.variables?.projectId === workspace.id &&
+ orgAdminAccessProject.isPending
+ }
+ >
+ Join as Admin
+ </Button>
+ ) : (
+ <Button
+ size="xs"
+ variant="outline_bg"
+ onClick={() => handlePopUpOpen("requestAccessConfirmation", workspace)}
+ >
+ Request Access
+ </Button>
+ )
+ }
+ </OrgPermissionCan>
)}
</div>
))}