mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-08 01:15:49 +02:00
fix: removing a strategy from a toggle should only require UPDATE_FEATURE permission
This commit is contained in:
parent
1c8f142699
commit
07202a9910
@ -5,11 +5,7 @@ import { IUnleashConfig } from '../../../types/option';
|
|||||||
import { IUnleashServices } from '../../../types/services';
|
import { IUnleashServices } from '../../../types/services';
|
||||||
import FeatureToggleServiceV2 from '../../../services/feature-toggle-service-v2';
|
import FeatureToggleServiceV2 from '../../../services/feature-toggle-service-v2';
|
||||||
import { Logger } from '../../../logger';
|
import { Logger } from '../../../logger';
|
||||||
import {
|
import { CREATE_FEATURE, UPDATE_FEATURE } from '../../../types/permissions';
|
||||||
CREATE_FEATURE,
|
|
||||||
DELETE_FEATURE,
|
|
||||||
UPDATE_FEATURE,
|
|
||||||
} from '../../../types/permissions';
|
|
||||||
import {
|
import {
|
||||||
FeatureToggleDTO,
|
FeatureToggleDTO,
|
||||||
IConstraint,
|
IConstraint,
|
||||||
@ -78,7 +74,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.get(`${PATH_STRATEGY}`, this.getStrategy);
|
this.get(`${PATH_STRATEGY}`, this.getStrategy);
|
||||||
this.put(`${PATH_STRATEGY}`, this.updateStrategy, UPDATE_FEATURE);
|
this.put(`${PATH_STRATEGY}`, this.updateStrategy, UPDATE_FEATURE);
|
||||||
this.patch(`${PATH_STRATEGY}`, this.patchStrategy, 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.get(PATH, this.getFeatures);
|
||||||
this.post(PATH, this.createFeature, CREATE_FEATURE);
|
this.post(PATH, this.createFeature, CREATE_FEATURE);
|
||||||
|
Loading…
Reference in New Issue
Block a user