Skip to content

Commit 7f597f9

Browse files
authored
[backend/frontend] Remove FINTEL_FOR_ENTITY feature flag (#15210)
1 parent bd4e032 commit 7f597f9

3 files changed

Lines changed: 4 additions & 28 deletions

File tree

opencti-platform/opencti-front/src/components/FilterValuesContent.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { truncate } from '../utils/String';
88
import { useFormatter } from './i18n';
99
import { FilterDefinition } from '../utils/hooks/useAuth';
1010
import useAttributes from '../utils/hooks/useAttributes';
11-
import useHelper from '../utils/hooks/useHelper';
1211

1312
export const filterValuesContentQuery = graphql`
1413
query FilterValuesContentQuery($filters: FilterGroup!, $isMeValueForbidden: Boolean) {
@@ -37,9 +36,6 @@ const FilterValuesContent: FunctionComponent<
3736
const { stixCoreObjectTypes } = useAttributes();
3837
const completedStixCoreObjectTypes = stixCoreObjectTypes.concat(['Stix-Core-Object', 'Stix-Cyber-Observable']);
3938

40-
const { isFeatureEnable } = useHelper();
41-
const isFintelForEntityFeatureEnabled = isFeatureEnable('FINTEL_FOR_ENTITY');
42-
4339
const filterType = filterDefinition?.type;
4440
let displayedValue = isFilterTooltip
4541
? filterValue(filterKey, value, filterType, filterOperator)
@@ -59,11 +55,7 @@ const FilterValuesContent: FunctionComponent<
5955
</span>
6056
<Tooltip
6157
style={{ marginLeft: 3, marginTop: -5, paddingTop: 7 }}
62-
title={
63-
isFintelForEntityFeatureEnabled
64-
? t_i18n('Current entity refers to the entity in which you will use the Fintel template. Removing this filter means you will lose the context of the entity in which the template is used.')
65-
: t_i18n('Current entity refers to the entity in which you will use the Fintel template. Removing this filter means you will lose the context of the container in which the template is used.')
66-
}
58+
title={t_i18n('Current entity refers to the entity in which you will use the Fintel template. Removing this filter means you will lose the context of the entity in which the template is used.')}
6759
>
6860
<InformationOutline color="primary" />
6961
</Tooltip>

opencti-platform/opencti-front/src/utils/hooks/useAttributes.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import useVocabularyCategory from './useVocabularyCategory';
22
import useAuth from './useAuth';
3-
import useHelper from './useHelper';
43

54
const ignoredAttributes = [
65
'id',
@@ -191,15 +190,6 @@ export const containerTypes = [
191190
'Observed-Data',
192191
];
193192

194-
// Old containers types to be removed when FINTEL_FOR_ENTITY will be deleted for all
195-
export const typesWithFintelTemplatesContainer = [
196-
'Report',
197-
'Grouping',
198-
'Case-Incident',
199-
'Case-Rfi',
200-
'Case-Rft',
201-
];
202-
203193
export const typesWithFintelTemplates = [
204194
// Containers
205195
'Report',
@@ -258,11 +248,6 @@ const useAttributes = () => {
258248

259249
const { metrics_definition } = settings;
260250

261-
const { isFeatureEnable } = useHelper();
262-
const typesWithFintelTemplatesEnabled = isFeatureEnable('FINTEL_FOR_ENTITY')
263-
? typesWithFintelTemplates
264-
: typesWithFintelTemplatesContainer;
265-
266251
const { sdos, scos } = schema;
267252
const stixDomainObjectTypes = sdos.map((sdo) => sdo.id);
268253
const stixCyberObservableTypes = scos.map((sco) => sco.id);
@@ -286,7 +271,7 @@ const useAttributes = () => {
286271
typesContainers,
287272
vocabularyAttributes: vocabularies.fields,
288273
containerTypes,
289-
typesWithFintelTemplates: typesWithFintelTemplatesEnabled,
274+
typesWithFintelTemplates,
290275
aliasedTypes,
291276
metricsDefinition: metrics_definition,
292277
};

opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate-domain.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { createEntity, deleteElementById, updateAttribute } from '../../database
1414
import { type BasicStoreEntityFintelTemplate, ENTITY_TYPE_FINTEL_TEMPLATE, type StoreEntityFintelTemplate } from './fintelTemplate-types';
1515
import { publishUserAction } from '../../listener/UserActionListener';
1616
import { notify } from '../../database/redis';
17-
import { BUS_TOPICS, isFeatureEnabled } from '../../config/conf';
17+
import { BUS_TOPICS } from '../../config/conf';
1818
import { ForbiddenAccess, FunctionalError } from '../../config/errors';
1919
import { storeLoadById } from '../../database/middleware-loader';
2020
import { generateFintelTemplateExecutiveSummary } from '../../utils/fintelTemplate/__executiveSummary.template';
@@ -94,8 +94,7 @@ export const addFintelTemplate = async (
9494
checkFintelTemplateWidgetsValidity(input.fintel_template_widgets ?? []);
9595
// get settings type
9696
const { settings_types: [settings_type] } = input;
97-
const isFintelForEntityFeatureEnabled = isFeatureEnabled('FINTEL_FOR_ENTITY');
98-
const isContainer = isFintelForEntityFeatureEnabled ? isStixDomainObjectContainer(settings_type) : true;
97+
const isContainer = isStixDomainObjectContainer(settings_type);
9998
// add id to fintel template widgets
10099
const widgetsWithIds = (input.fintel_template_widgets ?? []).map((templateWidget) => ({
101100
...templateWidget,

0 commit comments

Comments
 (0)