mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 09:22:56 +00:00
feat: greepy review
This commit is contained in:
@@ -212,9 +212,9 @@ export const permissionServiceFactory = ({
|
||||
const rootOrgId = permissionData?.[0]?.rootOrgId;
|
||||
const isChild = Boolean(rootOrgId);
|
||||
if (scope === OrganizationActionScope.ParentOrganization && isChild) {
|
||||
throw new BadRequestError({ message: `Child organization cannot do this operation` });
|
||||
throw new ForbiddenRequestError({ message: `Child organization cannot do this operation` });
|
||||
} else if (scope === OrganizationActionScope.ChildOrganization && !isChild) {
|
||||
throw new BadRequestError({ message: `Parent organization cannot do this operation` });
|
||||
throw new ForbiddenRequestError({ message: `Parent organization cannot do this operation` });
|
||||
}
|
||||
|
||||
const permissionFromRoles = permissionData.flatMap((membership) => {
|
||||
|
||||
Reference in New Issue
Block a user