Skip to content

Commit

Permalink
fix: give project_default_strategy_write the ability to update the de…
Browse files Browse the repository at this point in the history
…fault strategy

This appears to have been an oversight in the original implementation
of this endpoint. This seems to be the primary point of this
permission. Additionally, the docs mention that this permission should
allow you to do just that.
  • Loading branch information
thomasheartman committed Sep 6, 2024
1 parent ae71932 commit 30fa1ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/features/project-environments/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type IUnleashServices,
serializeDates,
UPDATE_PROJECT,
PROJECT_DEFAULT_STRATEGY_WRITE,
} from '../../types';
import type { Logger } from '../../logger';
import type EnvironmentService from './environment-service';
Expand Down Expand Up @@ -105,7 +106,7 @@ export default class EnvironmentsController extends Controller {
method: 'post',
path: `${PREFIX}/:environment/default-strategy`,
handler: this.updateDefaultStrategyForProjectEnvironment,
permission: UPDATE_PROJECT,
permission: [UPDATE_PROJECT, PROJECT_DEFAULT_STRATEGY_WRITE],
middleware: [
openApiService.validPath({
tags: ['Projects'],
Expand Down

0 comments on commit 30fa1ff

Please sign in to comment.