src/services/authorization/action-authorization.ts
File action-authorization.ts
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
ForestAdminClient,
} from '@forestadmin/forestadmin-client';
import hashObject from 'object-hash';
import BadRequestError from '../../utils/errors/bad-request-error';
Function getRoleIdsAllowedToApprove
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async getRoleIdsAllowedToApprove(
recordsCounterParams: RecordsCounterParams,
customActionName: string,
collectionName: string,
filterForCaller: GenericPlainTree,
Function doesTriggerCustomActionRequiresApproval
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async doesTriggerCustomActionRequiresApproval(
userId: string | number,
customActionName: string,
collectionName: string,
filterForCaller: GenericPlainTree,
Function assertCanTriggerCustomAction
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async assertCanTriggerCustomAction({
user: { id: userId },
collectionName,
customActionName,
filterForCaller,