summaryrefslogtreecommitdiff
path: root/app/controllers/projects/commit_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-06 18:06:46 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-06 18:06:46 -0600
commit9d7c5e75841eff48217487b3acda56cf265a2aef (patch)
treed90819e572eab930a8729ed767f6565620922e8a /app/controllers/projects/commit_controller.rb
parentb0279cc2239e0b24d59bc80085a9ba42fcf6226a (diff)
downloadgitlab-ce-9d7c5e75841eff48217487b3acda56cf265a2aef.tar.gz
Address feedback
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 5bcc545462f..aade1b6c256 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -95,9 +95,8 @@ class Projects::CommitController < Projects::ApplicationController
@diffs = commit.diffs(opts)
@notes_count = commit.notes.count
-
- @environment = @project.environments_for(commit: @commit).last
- @environment = nil unless can?(current_user, :read_environment, @environment)
+
+ @environment = EnvironmentsFinder.new(@project, current_user, commit: @commit).execute.last
end
def define_note_vars