Project maintainers can stop an environment even if it does not have a stop action

Issue

It seems we changed stop_environment permission model at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20077/diffs#92131ba644474991e4aa221fba0485680d1af39f_9_9, as the following


Condition 1

  1. An environment has a stop action
  2. The user can run the stop action (job)

Condition 2

  1. An environment does not have a stop action
  2. The user role is higher or equal to maintainer

If one of the conditions is fulfilled, then the user can stop the environment.


However, this permission model seems confusing for some user. I honestly do not have idea why the condition 2 is valid. An environment without stop actions should not be able to be stopped?

Edited Nov 21, 2018 by Shinya Maeda
Assignee Loading
Time tracking Loading