mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: corrected label for managed by and fixed picking scope correct for
identity
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user