diff options
author | Nick Thomas <nick@gitlab.com> | 2017-06-20 14:13:04 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-06-21 12:56:45 +0300 |
commit | 8e5bf9d8dc0cc7ef683eb9bebfe7fbde79db6cf1 (patch) | |
tree | 20fe2a7fd35d9d0b29e870dfdb626bc04bfc70c3 /app/controllers/projects/discussions_controller.rb | |
parent | 03228cb5b659ab6c9b631bafdf21ba77d6d2d2fa (diff) |
Use the new check_project_feature_available! method in project controllers
Diffstat (limited to 'app/controllers/projects/discussions_controller.rb')
-rw-r--r-- | app/controllers/projects/discussions_controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/projects/discussions_controller.rb b/app/controllers/projects/discussions_controller.rb index f4a18a5e8f7..2e6ab7903b8 100644 --- a/app/controllers/projects/discussions_controller.rb +++ b/app/controllers/projects/discussions_controller.rb @@ -1,5 +1,5 @@ class Projects::DiscussionsController < Projects::ApplicationController - before_action :module_enabled + before_action :check_merge_requests_available! before_action :merge_request before_action :discussion before_action :authorize_resolve_discussion! @@ -34,8 +34,4 @@ class Projects::DiscussionsController < Projects::ApplicationController def authorize_resolve_discussion! access_denied! unless discussion.can_resolve?(current_user) end - - def module_enabled - render_404 unless @project.feature_available?(:merge_requests, current_user) - end end |