Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

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

=a9c4a682d1e4
diff --git a/backend/src/ee/services/permission/permission-service.ts b/backend/src/ee/services/permission/permission-service.ts
index b71e63c10c..c90598b096 100644
--- a/backend/src/ee/services/permission/permission-service.ts
+++ b/backend/src/ee/services/permission/permission-service.ts
@@ -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
diff --git a/backend/src/services/identity-access-token/identity-access-token-service.ts b/backend/src/services/identity-access-token/identity-access-token-service.ts
index c720c97c0f..853c57fb10 100644
--- a/backend/src/services/identity-access-token/identity-access-token-service.ts
+++ b/backend/src/services/identity-access-token/identity-access-token-service.ts
@@ -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;
}
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
index a8e3e640d2..9d0adf8932 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
@@ -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
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
index bab3208cec..8ce45dcfde 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
@@ -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