feat: corrected label for managed by and fixed picking scope correct for

identity
This commit is contained in:
=
2025-11-13 12:52:39 +05:30
parent eead066009
commit a9c4a682d1
4 changed files with 8 additions and 10 deletions
@@ -234,20 +234,18 @@ export const identityAccessTokenServiceFactory = ({
parentOrgId = subOrganization.parentOrgId as string;
} else {
const organization = await orgDAL.findOne({ id: rootOrgId });
const identityOrgMembership = await membershipIdentityDAL.findOne({
scope: AccessScope.Organization,
actorIdentityId: identityAccessToken.identityId,
scopeOrgId: rootOrgId
scopeOrgId: identityOrgDetails.id
});
if (!identityOrgMembership) {
throw new BadRequestError({ message: "Identity does not belong to any organization" });
}
orgId = rootOrgId;
orgName = organization.name;
orgId = identityOrgDetails.id;
orgName = identityOrgDetails.name;
parentOrgId = rootOrgId;
}