From 98d64fc1e437c26ebee5797e62bd233907786a64 Mon Sep 17 00:00:00 2001 From: Fredrik Strand Oseberg Date: Mon, 6 Dec 2021 15:19:25 +0100 Subject: [PATCH] fix: open validate endpoint (#1162) * fix: open validate endpoint * fix: set validate permission to none --- src/lib/routes/admin-api/feature.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/routes/admin-api/feature.ts b/src/lib/routes/admin-api/feature.ts index bc3b00ad7b..8488996d44 100644 --- a/src/lib/routes/admin-api/feature.ts +++ b/src/lib/routes/admin-api/feature.ts @@ -8,6 +8,7 @@ import { UPDATE_FEATURE, DELETE_FEATURE, CREATE_FEATURE, + NONE, } from '../../types/permissions'; import { IUnleashConfig } from '../../types/option'; import { IUnleashServices } from '../../types/services'; @@ -44,7 +45,7 @@ class FeatureController extends Controller { this.get('/:featureName', this.getToggle); this.put('/:featureName', this.updateToggle, UPDATE_FEATURE); this.delete('/:featureName', this.archiveToggle, DELETE_FEATURE); - this.post('/validate', this.validate, UPDATE_FEATURE); + this.post('/validate', this.validate, NONE); this.post('/:featureName/toggle', this.toggle, UPDATE_FEATURE); this.post('/:featureName/toggle/on', this.toggleOn, UPDATE_FEATURE); this.post('/:featureName/toggle/off', this.toggleOff, UPDATE_FEATURE);