1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00

fix: removing a strategy from a toggle should only require UPDATE_FEATURE permission

This commit is contained in:
Ivar Conradi Østhus 2021-10-25 11:14:38 +02:00
parent 1c8f142699
commit 07202a9910
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -5,11 +5,7 @@ import { IUnleashConfig } from '../../../types/option';
import { IUnleashServices } from '../../../types/services';
import FeatureToggleServiceV2 from '../../../services/feature-toggle-service-v2';
import { Logger } from '../../../logger';
import {
CREATE_FEATURE,
DELETE_FEATURE,
UPDATE_FEATURE,
} from '../../../types/permissions';
import { CREATE_FEATURE, UPDATE_FEATURE } from '../../../types/permissions';
import {
FeatureToggleDTO,
IConstraint,
@ -78,7 +74,7 @@ export default class ProjectFeaturesController extends Controller {
this.get(`${PATH_STRATEGY}`, this.getStrategy);
this.put(`${PATH_STRATEGY}`, this.updateStrategy, UPDATE_FEATURE);
this.patch(`${PATH_STRATEGY}`, this.patchStrategy, UPDATE_FEATURE);
this.delete(`${PATH_STRATEGY}`, this.deleteStrategy, DELETE_FEATURE);
this.delete(`${PATH_STRATEGY}`, this.deleteStrategy, UPDATE_FEATURE);
this.get(PATH, this.getFeatures);
this.post(PATH, this.createFeature, CREATE_FEATURE);