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/labels_controller.rb | |
parent | 03228cb5b659ab6c9b631bafdf21ba77d6d2d2fa (diff) |
Use the new check_project_feature_available! method in project controllers
Diffstat (limited to 'app/controllers/projects/labels_controller.rb')
-rw-r--r-- | app/controllers/projects/labels_controller.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 1beac202efe..daa973c9281 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -1,7 +1,7 @@ class Projects::LabelsController < Projects::ApplicationController include ToggleSubscriptionAction - before_action :module_enabled + before_action :check_issuables_available! before_action :label, only: [:edit, :update, :destroy, :promote] before_action :find_labels, only: [:index, :set_priorities, :remove_priority, :toggle_subscription] before_action :authorize_read_label! @@ -135,12 +135,6 @@ class Projects::LabelsController < Projects::ApplicationController protected - def module_enabled - unless @project.feature_available?(:issues, current_user) || @project.feature_available?(:merge_requests, current_user) - return render_404 - end - end - def label_params params.require(:label).permit(:title, :description, :color) end |