diff options
author | Mykhailo Formus <mikeformus@gmail.com> | 2018-07-12 09:55:01 +0000 |
---|---|---|
committer | Mykhailo Formus <mikeformus@gmail.com> | 2018-07-12 09:55:01 +0000 |
commit | 7a21f39df92baaa88f9533316e7b19c9c70bd91e (patch) | |
tree | 090f49a7edc682c31ac29465205c16201bdbe03d /lib/api/environments.rb | |
parent | 331f8d71b2c778f10b926114caeb718bce7294d6 (diff) | |
parent | 767ccaa1725048cd2b27fbf1081cba3ba89d2926 (diff) | |
download | gitlab-ce-mikeformus/gitlab-ce-qa-264.tar.gz |
Merge branch 'master' into qa-264mikeformus/gitlab-ce-qa-264
Diffstat (limited to 'lib/api/environments.rb')
-rw-r--r-- | lib/api/environments.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 5c63ec028d9..fa828f43001 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -89,9 +89,10 @@ module API requires :environment_id, type: Integer, desc: 'The environment ID' end post ':id/environments/:environment_id/stop' do - authorize! :create_deployment, user_project + authorize! :read_environment, user_project environment = user_project.environments.find(params[:environment_id]) + authorize! :stop_environment, environment environment.stop_with_action!(current_user) |