diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-04 21:37:03 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-04 21:37:03 +0300 |
commit | 9faf957bd3cfc5cdc248c3e862579902cc1da39c (patch) | |
tree | b67e295910ae8bad648e04a7975d2e9d1e7df2bf /lib/api/environments.rb | |
parent | d8b4e585a131879d3094dea287d19bfa0cf18333 (diff) | |
parent | b11d018bd59a3c94086dbeb11f38db81e441a1e2 (diff) |
Merge branch 'security-protect-private-repo-information' into 'master'
Fix leaking private repository information in API
See merge request gitlab/gitlabhq!2881
Diffstat (limited to 'lib/api/environments.rb')
-rw-r--r-- | lib/api/environments.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/environments.rb b/lib/api/environments.rb index 0278c6c54a5..5b0f3b914cb 100644 --- a/lib/api/environments.rb +++ b/lib/api/environments.rb @@ -22,7 +22,7 @@ module API get ':id/environments' do authorize! :read_environment, user_project - present paginate(user_project.environments), with: Entities::Environment + present paginate(user_project.environments), with: Entities::Environment, current_user: current_user end desc 'Creates a new environment' do @@ -40,7 +40,7 @@ module API environment = user_project.environments.create(declared_params) if environment.persisted? - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user else render_validation_error!(environment) end @@ -63,7 +63,7 @@ module API update_params = declared_params(include_missing: false).extract!(:name, :external_url) if environment.update(update_params) - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user else render_validation_error!(environment) end @@ -99,7 +99,7 @@ module API environment.stop_with_action!(current_user) status 200 - present environment, with: Entities::Environment + present environment, with: Entities::Environment, current_user: current_user end end end |