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

identity
This commit is contained in:
=
2025-11-06 10:36:41 +05:30
parent eead066009
commit a9c4a682d1
4 changed files with 8 additions and 10 deletions

View File

@@ -362,7 +362,7 @@ export const permissionServiceFactory = ({
actorId,
actorType: actor
});
if (!permissionData?.length) throw new ForbiddenRequestError({ name: "You are not member of this organization" });
if (!permissionData?.length) throw new ForbiddenRequestError({ name: "You are not member of this project" });
const permissionFromRoles = permissionData.flatMap((membership) => {
const activeRoles = membership?.roles

View File

@@ -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;
}