Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Environment permission does not allow user to create environment #2670

Closed
1 of 4 tasks
matthewelwell opened this issue Aug 22, 2023 · 1 comment · Fixed by #2675
Closed
1 of 4 tasks

Create Environment permission does not allow user to create environment #2670

matthewelwell opened this issue Aug 22, 2023 · 1 comment · Fixed by #2675
Assignees
Labels
bug Something isn't working

Comments

@matthewelwell
Copy link
Contributor

Describe the bug

Users with Create Environment permission should be able to create a new environment. Since the create environment workflow uses the clone endpoint if there are existing environments, this is not working.

To Reproduce

Steps to reproduce the behaviour:

  1. Give a user View Project and Create Environment permissions on a project, and view environment permissions on at least one other environment
  2. Login as the user with these permissions and attempt to create a new environment
  3. Notice that the request to create the new environment (by cloning another one) fails with 403 and the environment is not created

Expected behavior

The environment is created successfully.

Screenshots

image

How are you running Flagsmith?

  • Self Hosted with Docker
  • Self Hosted with Kubernetes
  • SaaS at flagsmith.com
  • Some other way

Tested via SaaS but affects all deployment types.

Additional context

N/a

@matthewelwell matthewelwell added the bug Something isn't working label Aug 22, 2023
@matthewelwell
Copy link
Contributor Author

I suggest that we change the permissions on the clone environment endpoint to use the CREATE_ENVIRONMENT permission.

Currently the endpoint requires the user to be an admin of the environment they are trying to clone but I think this is not necessarily by design. An alternative solution would be for the FE to only show environments for which they are admins for the user to clone from, but I don't think this is the desired outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants