mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 11:28:18 +00:00
fix: correct sub-org identity check
This commit is contained in:
@@ -64,7 +64,7 @@ const Page = () => {
|
|||||||
select: (el) => el.identityId as string
|
select: (el) => el.identityId as string
|
||||||
});
|
});
|
||||||
const { currentProject, projectId } = useProject();
|
const { currentProject, projectId } = useProject();
|
||||||
const { currentOrg } = useOrganization();
|
const { currentOrg, isSubOrganization } = useOrganization();
|
||||||
|
|
||||||
const { data: identityMembershipDetails, isPending: isMembershipDetailsLoading } =
|
const { data: identityMembershipDetails, isPending: isMembershipDetailsLoading } =
|
||||||
useGetProjectIdentityMembershipV2(projectId, identityId);
|
useGetProjectIdentityMembershipV2(projectId, identityId);
|
||||||
@@ -167,7 +167,9 @@ const Page = () => {
|
|||||||
|
|
||||||
const isOrgIdentity = !isProjectIdentity;
|
const isOrgIdentity = !isProjectIdentity;
|
||||||
const isSubOrgIdentity =
|
const isSubOrgIdentity =
|
||||||
isOrgIdentity && currentOrg.rootOrgId !== identityMembershipDetails?.identity.orgId;
|
isOrgIdentity &&
|
||||||
|
isSubOrganization &&
|
||||||
|
currentOrg.rootOrgId !== identityMembershipDetails?.identity.orgId;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex max-w-8xl flex-col">
|
<div className="mx-auto flex max-w-8xl flex-col">
|
||||||
|
|||||||
Reference in New Issue
Block a user