diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-20 11:03:41 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:58:24 -0200 |
commit | baf47a0bd0e0563cbc99b3ae4b1336b8b3b4380a (patch) | |
tree | 267498617c4b8a33d3ae5b7d350f49d73152a061 /app/controllers/concerns | |
parent | cf14482a5aceb62c178c19cc70e9354dc23dd9e1 (diff) | |
download | gitlab-ce-baf47a0bd0e0563cbc99b3ae4b1336b8b3b4380a.tar.gz |
Remove project_labels from Projects::ApplicationController
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index bb32bc502e6..27f1e91d865 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -2,6 +2,7 @@ module IssuableActions extend ActiveSupport::Concern included do + before_action :labels, only: [:new, :edit] before_action :authorize_destroy_issuable!, only: :destroy before_action :authorize_admin_issuable!, only: :bulk_update end @@ -25,6 +26,10 @@ module IssuableActions private + def labels + @labels ||= LabelsFinder.new(current_user, project_id: @project.id).execute + end + def authorize_destroy_issuable! unless can?(current_user, :"destroy_#{issuable.to_ability_name}", issuable) return access_denied! |