Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Seien Sie vorsichtig, definieren Sie bitte einen Filter für Ihre Ausschlussregel, da sonst, da keine Filter gesetzt sind, jeder Indikator der Regel entspricht und eine Ausschlussregel haben wird",
"Be careful, you are about to delete the selected entities": "Seien Sie vorsichtig, Sie sind dabei, die ausgewählten Einheiten zu löschen",
"Be careful, you are about to delete the selected entities (not the relationships)": "Seien Sie vorsichtig, Sie sind dabei, die ausgewählten Entitäten zu löschen (nicht die Beziehungen)",
"Be careful, you are about to delete the selected relationships": "Seien Sie vorsichtig, Sie sind dabei, die ausgewählten Beziehungen zu löschen",
"Be careful, you are about to delete the selected observables (not the relationships)": "Vorsicht, Sie sind im Begriff, die ausgewählten Observablen (nicht die Beziehungen) zu löschen",
"Bearer token": "Bearer-Token",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "Denn standardmäßig enthält der Entwurf keine Änderungen, die nach der Erstellung der Workbench an der Entität vorgenommen wurden.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule",
"Be careful, you are about to delete the selected entities": "Be careful, you are about to delete the selected entities",
"Be careful, you are about to delete the selected entities (not the relationships)": "Be careful, you are about to delete the selected entities (not the relationships)",
"Be careful, you are about to delete the selected relationships": "Be careful, you are about to delete the selected relationships",
"Be careful, you are about to delete the selected observables (not the relationships)": "Be careful, you are about to delete the selected observables (not the relationships)",
"Bearer token": "Bearer token",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "Because by default the draft won't include the updates made on the entity after the creation of the workbench.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Tenga cuidado, por favor defina algún filtro para su regla de exclusión, de lo contrario, ya que no se establecen filtros, cualquier indicador coincidirá con la regla y tendrá una regla de exclusión",
"Be careful, you are about to delete the selected entities": "Tenga cuidado, está a punto de eliminar las entidades seleccionadas",
"Be careful, you are about to delete the selected entities (not the relationships)": "Tenga cuidado, está a punto de eliminar las entidades seleccionadas (no las relaciones)",
"Be careful, you are about to delete the selected relationships": "Tenga cuidado, está a punto de eliminar las relaciones seleccionadas",
"Be careful, you are about to delete the selected observables (not the relationships)": "Cuidado, está a punto de borrar los observables seleccionados (no las relaciones)",
"Bearer token": "Token portador",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "Porque, por defecto, el borrador no incluirá las actualizaciones realizadas en la entidad tras la creación del entorno de trabajo.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Attention, définissez un filtre pour votre règle d'exclusion, sinon, comme aucun filtre n'est défini, n'importe quel indicateur correspondra à la règle et aura une règle d'exclusion",
"Be careful, you are about to delete the selected entities": "Attention, vous êtes sur le point de supprimer les entités sélectionnées",
"Be careful, you are about to delete the selected entities (not the relationships)": "Attention, vous êtes sur le point de supprimer les entités sélectionnées (pas les relations)",
"Be careful, you are about to delete the selected relationships": "Attention, vous êtes sur le point de supprimer les relations sélectionnées",
"Be careful, you are about to delete the selected observables (not the relationships)": "Attention, vous êtes sur le point de supprimer les observables sélectionnés (pas les relations)",
"Bearer token": "Token d'authentification",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "En effet, par défaut, le brouillon n'inclut pas les mises à jour apportées à l'entité après la création du tableau de bord.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Attenzione, definire un filtro per la regola di esclusione, altrimenti, poiché non sono impostati filtri, qualsiasi indicatore corrisponderà alla regola e avrà una regola di esclusione",
"Be careful, you are about to delete the selected entities": "Attenzione, stai per eliminare le entità selezionate",
"Be careful, you are about to delete the selected entities (not the relationships)": "Attenzione, stai per eliminare le entità selezionate (non le relazioni)",
"Be careful, you are about to delete the selected relationships": "Attenzione, stai per eliminare le relazioni selezionate",
"Be careful, you are about to delete the selected observables (not the relationships)": "Attenzione, stai per eliminare gli osservabili selezionati (non le relazioni)",
"Bearer token": "Token Bearer",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "Questo perché, per impostazione predefinita, la bozza non includerà gli aggiornamenti apportati all'entità dopo la creazione del workbench.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "さもないと、フィルターが設定されていないため、どのインジケーターもルールにマッチし、除外ルールを持つことになります。",
"Be careful, you are about to delete the selected entities": "選択したエンティティを削除しようとしているので注意してください。",
"Be careful, you are about to delete the selected entities (not the relationships)": "選択したエンティティを削除しようとしているので注意してください(リレーションシップではありません)。",
"Be careful, you are about to delete the selected relationships": "選択したリレーションシップを削除しようとしているので注意してください。",
"Be careful, you are about to delete the selected observables (not the relationships)": "注意してください、選択されたオブザーバブルを削除しようとしています(リレーションシップではありません)",
"Bearer token": "ベアラートークン",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "デフォルトでは、ワークベンチ作成後にエンティティに対して行われた更新内容は下書きに含まれないためです。",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "제외 규칙에 대한 필터를 정의하지 않으면 필터가 설정되어 있지 않으므로 모든 지표가 규칙과 일치하고 제외 규칙을 갖게 되므로 주의하세요",
"Be careful, you are about to delete the selected entities": "주의하십시오, 선택한 엔터티를 삭제하려고 합니다",
"Be careful, you are about to delete the selected entities (not the relationships)": "주의하십시오, 선택한 엔터티를 삭제하려고 합니다 (관계는 제외)",
"Be careful, you are about to delete the selected relationships": "주의하십시오, 선택한 관계를 삭제하려고 합니다",
"Be careful, you are about to delete the selected observables (not the relationships)": "주의하십시오, 선택한 관찰 가능 항목을 삭제하려고 합니다 (관계는 제외)",
"Bearer token": "베어러 토큰",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "기본적으로 초안에는 워크벤치 생성 후 엔티티에 적용된 업데이트 내용이 포함되지 않기 때문입니다.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "Будьте внимательны, задайте какой-нибудь фильтр для правила исключения, иначе, поскольку фильтры не заданы, любой индикатор будет соответствовать правилу и будет иметь правило исключения",
"Be careful, you are about to delete the selected entities": "Будьте осторожны, вы собираетесь удалить выбранные сущности.",
"Be careful, you are about to delete the selected entities (not the relationships)": "Будьте осторожны, вы собираетесь удалить выбранные сущности (не связи).",
"Be careful, you are about to delete the selected relationships": "Будьте осторожны, вы собираетесь удалить выбранные связи.",
"Be careful, you are about to delete the selected observables (not the relationships)": "Будьте осторожны, вы собираетесь удалить выбранные объекты наблюдения (не отношения).",
"Bearer token": "Токен Bearer",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "Поскольку по умолчанию черновик не будет включать изменения, внесенные в объект после создания рабочей среды.",
Expand Down
1 change: 1 addition & 0 deletions opencti-platform/opencti-front/lang/front/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
"Be careful, please define some filter for your exclusion rule, otherwise, since no filters are set, any indicator will match the rule and will have an exclusion rule": "请注意,请为您的排除规则定义一些筛选器,否则,由于没有设置筛选器,任何指标都将匹配该规则,并具有一个排除规则",
"Be careful, you are about to delete the selected entities": "小心,您将删除选定的实体",
"Be careful, you are about to delete the selected entities (not the relationships)": "小心,您将删除选定的实体(而不是关系)",
"Be careful, you are about to delete the selected relationships": "小心,您将删除选定的关系",
"Be careful, you are about to delete the selected observables (not the relationships)": "小心,您将删除所选的可观察对象(而不是关系)",
"Bearer token": "承载令牌",
"Because by default the draft won't include the updates made on the entity after the creation of the workbench.": "因为默认情况下,草稿不会包含在工作台创建后对该实体所做的更新。",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { describe, expect, it } from 'vitest';
import { buildReportRelationshipsContextFilters } from './ReportStixCoreRelationships';
import type { FilterGroup } from '../../../../utils/filters/filtersHelpers-types';

describe('buildReportRelationshipsContextFilters', () => {
it('scopes the query to the report objects, with no user filters', () => {
const result = buildReportRelationshipsContextFilters('report-id', undefined);

expect(result).toEqual({
mode: 'and',
filters: [{ key: 'objects', values: ['report-id'], operator: 'eq', mode: 'or' }],
filterGroups: [],
});
});

it('keeps the report membership filter mandatory, nesting user filters instead of merging them', () => {
const userFilters: FilterGroup = {
mode: 'or',
filters: [{ key: 'relationship_type', values: ['uses'], operator: 'eq', mode: 'or' }],
filterGroups: [],
};

const result = buildReportRelationshipsContextFilters('report-id', userFilters);

expect(result.filters).toEqual([{ key: 'objects', values: ['report-id'], operator: 'eq', mode: 'or' }]);
expect(result.filterGroups).toEqual([userFilters]);
// The mandatory filter and the user filters are combined with AND: user filters,
// however permissive ('or' mode), can never widen the query outside the report.
expect(result.mode).toEqual('and');
});

it('drops empty user filter groups instead of nesting them', () => {
const emptyUserFilters: FilterGroup = { mode: 'and', filters: [], filterGroups: [] };

const result = buildReportRelationshipsContextFilters('report-id', emptyUserFilters);

expect(result.filterGroups).toEqual([]);
});
});
Loading
Loading