mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 00:51:15 +00:00
feat: completed switch in metadata and resolved ts errors in backend
This commit is contained in:
@@ -309,7 +309,7 @@ export const identityJwtAuthServiceFactory = ({
|
||||
identityId
|
||||
});
|
||||
if (!identityMembershipOrg) throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` });
|
||||
if (identityMembershipOrg.identity.identityOrgId !== actorOrgId) {
|
||||
if (identityMembershipOrg.identity.orgId !== actorOrgId) {
|
||||
throw new ForbiddenRequestError({ message: "Sub organization not authorized to access this identity" });
|
||||
}
|
||||
if (identityMembershipOrg.identity.authMethods.includes(IdentityAuthMethod.JWT_AUTH)) {
|
||||
@@ -416,7 +416,7 @@ export const identityJwtAuthServiceFactory = ({
|
||||
identityId
|
||||
});
|
||||
if (!identityMembershipOrg) throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` });
|
||||
if (identityMembershipOrg.identity.identityOrgId !== actorOrgId) {
|
||||
if (identityMembershipOrg.identity.orgId !== actorOrgId) {
|
||||
throw new ForbiddenRequestError({ message: "Sub organization not authorized to access this identity" });
|
||||
}
|
||||
|
||||
@@ -524,7 +524,7 @@ export const identityJwtAuthServiceFactory = ({
|
||||
identityId
|
||||
});
|
||||
if (!identityMembershipOrg) throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` });
|
||||
if (identityMembershipOrg.identity.identityOrgId !== actorOrgId) {
|
||||
if (identityMembershipOrg.identity.orgId !== actorOrgId) {
|
||||
throw new ForbiddenRequestError({ message: "Sub organization not authorized to access this identity" });
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ export const identityJwtAuthServiceFactory = ({
|
||||
if (!identityMembershipOrg) {
|
||||
throw new NotFoundError({ message: "Failed to find identity" });
|
||||
}
|
||||
if (identityMembershipOrg.identity.identityOrgId !== actorOrgId) {
|
||||
if (identityMembershipOrg.identity.orgId !== actorOrgId) {
|
||||
throw new ForbiddenRequestError({ message: "Sub organization not authorized to access this identity" });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user