Skip to content

Commit

Permalink
[backend] Put noFiltersChecking: true when needed (#4636)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien committed Dec 4, 2023
1 parent a798f2f commit 7699a79
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const closeOldWorks = async (context, connector) => {
};
await elList(context, SYSTEM_USER, [INDEX_HISTORY], {
filters,
noFiltersChecking: true,
types: ['Work'],
connectionFormat: false,
callback: queryCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const revokedInstances = async (context) => {
],
filterGroups: [],
};
const opts = { filters, connectionFormat: false, callback };
const opts = { filters, noFiltersChecking: true, connectionFormat: false, callback };
await elList(context, SYSTEM_USER, READ_DATA_INDICES, opts);
};

Expand Down
3 changes: 2 additions & 1 deletion opencti-platform/opencti-graphql/src/manager/ruleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ const applyCleanupOnDependencyIds = async (deletionIds: Array<string>) => {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
await rulesCleanHandler(context, RULE_MANAGER_USER, elements, RULES_DECLARATION, deletionIds);
};
await elList(context, RULE_MANAGER_USER, READ_DATA_INDICES, { filters, callback });
const opts = { filters, noFiltersChecking: true, callback };
await elList(context, RULE_MANAGER_USER, READ_DATA_INDICES, opts);
};

export const rulesApplyHandler = async (context: AuthContext, user: AuthUser, events: Array<DataEvent>, forRules: Array<RuleRuntime> = []) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ export const up = async (next) => {
}
],
filterGroups: [],
}
},
noFiltersChecking: true
}
);

Expand Down

0 comments on commit 7699a79

Please sign in to comment.