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

View File

@@ -83,7 +83,7 @@ export const IdentityTab = withProjectPermission(
() => {
const { currentProject, projectId } = useProject();
const navigate = useNavigate();
const { isSubOrganization } = useOrganization();
const { isSubOrganization, currentOrg } = useOrganization();
const {
offset,
@@ -279,7 +279,7 @@ export const IdentityTab = withProjectPermission(
data.identityMemberships.length > 0 &&
data.identityMemberships.map((identityMember) => {
const {
identity: { id, name, projectId: identityProjectId },
identity: { id, name, projectId: identityProjectId, orgId: identityOrgId },
roles
} = identityMember;
return (
@@ -412,7 +412,7 @@ export const IdentityTab = withProjectPermission(
<ProjectIcon />
Project
</>
) : isSubOrganization ? (
) : isSubOrganization && currentOrg.id === identityOrgId ? (
<>
<SubOrgIcon />
Sub-Organization

View File

@@ -143,7 +143,7 @@ export const ProjectIdentityDetailsSection = ({ identity, membership }: Props) =
<div className="mb-4">
<p className="text-sm font-medium text-mineshaft-300">Identity ID</p>
<div className="group flex align-top">
<p className="text-sm text-mineshaft-300">{identity.id}</p>
<p className="text-sm break-all text-mineshaft-300">{identity.id}</p>
<div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
<Tooltip content={copyTextId}>
<IconButton