From 96bbc585a066363677e6b6ebe3cc98780754a3b2 Mon Sep 17 00:00:00 2001 From: Florian Delemarre Date: Fri, 3 Apr 2026 16:53:05 +0200 Subject: [PATCH] [backend/frontend] Remove `FINTEL_FOR_ENTITY` feature flag (#15210) --- .../src/components/FilterValuesContent.tsx | 10 +--------- .../src/utils/hooks/useAttributes.ts | 17 +---------------- .../fintelTemplate/fintelTemplate-domain.ts | 5 ++--- 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/opencti-platform/opencti-front/src/components/FilterValuesContent.tsx b/opencti-platform/opencti-front/src/components/FilterValuesContent.tsx index 9ea100c9e52b..6494c4985f2a 100644 --- a/opencti-platform/opencti-front/src/components/FilterValuesContent.tsx +++ b/opencti-platform/opencti-front/src/components/FilterValuesContent.tsx @@ -8,7 +8,6 @@ import { truncate } from '../utils/String'; import { useFormatter } from './i18n'; import { FilterDefinition } from '../utils/hooks/useAuth'; import useAttributes from '../utils/hooks/useAttributes'; -import useHelper from '../utils/hooks/useHelper'; export const filterValuesContentQuery = graphql` query FilterValuesContentQuery($filters: FilterGroup!, $isMeValueForbidden: Boolean) { @@ -37,9 +36,6 @@ const FilterValuesContent: FunctionComponent< const { stixCoreObjectTypes } = useAttributes(); const completedStixCoreObjectTypes = stixCoreObjectTypes.concat(['Stix-Core-Object', 'Stix-Cyber-Observable']); - const { isFeatureEnable } = useHelper(); - const isFintelForEntityFeatureEnabled = isFeatureEnable('FINTEL_FOR_ENTITY'); - const filterType = filterDefinition?.type; let displayedValue = isFilterTooltip ? filterValue(filterKey, value, filterType, filterOperator) @@ -59,11 +55,7 @@ const FilterValuesContent: FunctionComponent< diff --git a/opencti-platform/opencti-front/src/utils/hooks/useAttributes.ts b/opencti-platform/opencti-front/src/utils/hooks/useAttributes.ts index 2b23bd396e7a..4cc41b5ff1d7 100644 --- a/opencti-platform/opencti-front/src/utils/hooks/useAttributes.ts +++ b/opencti-platform/opencti-front/src/utils/hooks/useAttributes.ts @@ -1,6 +1,5 @@ import useVocabularyCategory from './useVocabularyCategory'; import useAuth from './useAuth'; -import useHelper from './useHelper'; const ignoredAttributes = [ 'id', @@ -191,15 +190,6 @@ export const containerTypes = [ 'Observed-Data', ]; -// Old containers types to be removed when FINTEL_FOR_ENTITY will be deleted for all -export const typesWithFintelTemplatesContainer = [ - 'Report', - 'Grouping', - 'Case-Incident', - 'Case-Rfi', - 'Case-Rft', -]; - export const typesWithFintelTemplates = [ // Containers 'Report', @@ -258,11 +248,6 @@ const useAttributes = () => { const { metrics_definition } = settings; - const { isFeatureEnable } = useHelper(); - const typesWithFintelTemplatesEnabled = isFeatureEnable('FINTEL_FOR_ENTITY') - ? typesWithFintelTemplates - : typesWithFintelTemplatesContainer; - const { sdos, scos } = schema; const stixDomainObjectTypes = sdos.map((sdo) => sdo.id); const stixCyberObservableTypes = scos.map((sco) => sco.id); @@ -286,7 +271,7 @@ const useAttributes = () => { typesContainers, vocabularyAttributes: vocabularies.fields, containerTypes, - typesWithFintelTemplates: typesWithFintelTemplatesEnabled, + typesWithFintelTemplates, aliasedTypes, metricsDefinition: metrics_definition, }; diff --git a/opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate-domain.ts b/opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate-domain.ts index 73496c18c916..955b20258192 100644 --- a/opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate-domain.ts +++ b/opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate-domain.ts @@ -14,7 +14,7 @@ import { createEntity, deleteElementById, updateAttribute } from '../../database import { type BasicStoreEntityFintelTemplate, ENTITY_TYPE_FINTEL_TEMPLATE, type StoreEntityFintelTemplate } from './fintelTemplate-types'; import { publishUserAction } from '../../listener/UserActionListener'; import { notify } from '../../database/redis'; -import { BUS_TOPICS, isFeatureEnabled } from '../../config/conf'; +import { BUS_TOPICS } from '../../config/conf'; import { ForbiddenAccess, FunctionalError } from '../../config/errors'; import { storeLoadById } from '../../database/middleware-loader'; import { generateFintelTemplateExecutiveSummary } from '../../utils/fintelTemplate/__executiveSummary.template'; @@ -94,8 +94,7 @@ export const addFintelTemplate = async ( checkFintelTemplateWidgetsValidity(input.fintel_template_widgets ?? []); // get settings type const { settings_types: [settings_type] } = input; - const isFintelForEntityFeatureEnabled = isFeatureEnabled('FINTEL_FOR_ENTITY'); - const isContainer = isFintelForEntityFeatureEnabled ? isStixDomainObjectContainer(settings_type) : true; + const isContainer = isStixDomainObjectContainer(settings_type); // add id to fintel template widgets const widgetsWithIds = (input.fintel_template_widgets ?? []).map((templateWidget) => ({ ...templateWidget,