Skip to content

Commit

Permalink
[backend] remove unecessary feature flag & fix for feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SouadHadjiat authored and marieflorescontact committed Sep 6, 2024
1 parent 4d5054b commit 52af1e6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions opencti-platform/opencti-graphql/src/domain/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ import { now } from '../utils/format';
import { elCount, elFindByIds, ES_DEFAULT_PAGINATION, MAX_RELATED_CONTAINER_RESOLUTION } from '../database/engine';
import { findById as findInvestigationById } from '../modules/workspace/workspace-domain';
import { stixCoreObjectAddRelations } from './stixCoreObject';
import { addFilter } from '../utils/filtering/filtering-utils';
import { editAuthorizedMembers } from '../utils/authorizedMembers';
import { isFeatureEnabled } from '../config/conf';
import { UnsupportedError } from '../config/errors';
import { addFilter } from '../utils/filtering/filtering-utils';

export const findById = async (context, user, containerId) => {
return storeLoadById(context, user, containerId, ENTITY_TYPE_CONTAINER);
Expand Down Expand Up @@ -225,16 +223,12 @@ export const knowledgeAddFromInvestigation = async (context, user, { containerId
};

export const containerEditAuthorizedMembers = async (context, user, entityId, input) => {
if (!isFeatureEnabled('CONTAINERS_AUTHORIZED_MEMBERS')) {
throw UnsupportedError('This feature is disabled');
}
const args = {
entityId,
input,
requiredCapabilities: ['KNOWLEDGE_KNUPDATE_KNMANAGEAUTHMEMBERS'],
entityType: ENTITY_TYPE_CONTAINER,
busTopicKey: ABSTRACT_STIX_CORE_OBJECT,
};
// @ts-expect-error TODO improve busTopicKey types to avoid this
return editAuthorizedMembers(context, user, args);
};

0 comments on commit 52af1e6

Please sign in to comment.