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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user