diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
index bf734de63..037429ad3 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
@@ -1,5 +1,5 @@
import { useState } from "react";
-import { faChevronDown, faLink, faPlus } from "@fortawesome/free-solid-svg-icons";
+import { faPlus } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { AnimatePresence, motion } from "framer-motion";
import { LinkIcon, PlusIcon } from "lucide-react";
@@ -7,15 +7,7 @@ import { LinkIcon, PlusIcon } from "lucide-react";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
-import {
- Button,
- DeleteActionModal,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuTrigger,
- Modal,
- ModalContent
-} from "@app/components/v2";
+import { Button, DeleteActionModal, Modal, ModalContent } from "@app/components/v2";
import { DocumentationLinkBadge } from "@app/components/v3";
import {
OrgPermissionIdentityActions,
@@ -25,7 +17,7 @@ import {
} from "@app/context";
import { OrgPermissionMachineIdentityAuthTemplateActions } from "@app/context/OrgPermissionContext/types";
import { withPermission } from "@app/hoc";
-import { subOrganizationsQuery, useDeleteOrgIdentity } from "@app/hooks/api";
+import { useDeleteOrgIdentity } from "@app/hooks/api";
import { useDeleteIdentityAuthTemplate } from "@app/hooks/api/identityAuthTemplates";
import { usePopUp } from "@app/hooks/usePopUp";
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
index b7860d584..2f8ce56c5 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx
@@ -293,6 +293,8 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
lastLoginAuthMethod,
lastLoginTime
}) => {
+ const isSubOrgIdentity = currentOrg.id === orgId;
+
return (
{
{isSubOrganization && (
|
-
- {currentOrg.id === orgId ? (
+
+ {isSubOrgIdentity ? (
<>
Sub-Organization
@@ -403,7 +405,7 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
}}
isDisabled={!isAllowed}
>
- Edit Identity
+ Edit Identity {isSubOrgIdentity ? "" : "Membership"}
)}
@@ -423,9 +425,9 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {
isDisabled={!isAllowed}
icon={}
>
- {orgId !== currentOrg.id
- ? "Remove From Sub-organization"
- : "Delete Identity"}
+ {isSubOrgIdentity
+ ? "Delete Identity"
+ : "Remove From Sub-Organization"}
)}
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
index 0f7153a11..9c54a1e54 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/OrgIdentityModal.tsx
@@ -14,8 +14,6 @@ import {
FormLabel,
IconButton,
Input,
- Modal,
- ModalContent,
Switch
} from "@app/components/v2";
import { useOrganization } from "@app/context";
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
index b34b7df68..b19901bef 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
@@ -110,7 +110,7 @@ export const IdentityDetailsSection = ({ identityId, handlePopUpOpen, isOrgIdent
icon={}
disabled={!isAllowed}
>
- {!isOrgIdentity ? "Unlink Identity" : "Delete Identity"}
+ {!isOrgIdentity ? "Remove From Sub-Organization" : "Delete Identity"}
)}
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
index 61d48c52d..e98633368 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
@@ -46,6 +46,7 @@ import {
Tooltip,
Tr
} from "@app/components/v2";
+import { Blur } from "@app/components/v2/Blur";
import {
Badge,
DocumentationLinkBadge,
@@ -79,7 +80,6 @@ import { usePopUp } from "@app/hooks/usePopUp";
import { ProjectIdentityModal } from "@app/pages/project/AccessControlPage/components/IdentityTab/components/ProjectIdentityModal";
import { ProjectLinkIdentityModal } from "./components/ProjectLinkIdentityModal";
-import { Blur } from "@app/components/v2/Blur";
const MAX_ROLES_TO_BE_SHOWN_IN_TABLE = 2;
@@ -389,7 +389,16 @@ export const IdentityTab = withProjectPermission(
|
-
+
{/* eslint-disable-next-line no-nested-ternary */}
{identityProjectId ? (
<>
@@ -443,9 +452,7 @@ export const IdentityTab = withProjectPermission(
});
}}
>
- {identityProjectId
- ? "Delete Project Identity"
- : "Remove Identity From Project"}
+ {identityProjectId ? "Delete Identity" : "Remove From Project"}
)}
|