Commit 613ce644 authored by Patrick Derichs's avatar Patrick Derichs

Aligned IssuesController implementation with EE

parent ce02daea
...@@ -10,11 +10,11 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -10,11 +10,11 @@ class Projects::IssuesController < Projects::ApplicationController
include SpammableActions include SpammableActions
include RecordUserLastActivity include RecordUserLastActivity
def self.issue_except_actions def issue_except_actions
%i[index calendar new create bulk_update import_csv] %i[index calendar new create bulk_update import_csv]
end end
def self.set_issuables_index_only_actions def set_issuables_index_only_actions
%i[index calendar] %i[index calendar]
end end
...@@ -25,9 +25,9 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -25,9 +25,9 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update] before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update]
before_action :check_issues_available! before_action :check_issues_available!
before_action :issue, except: issue_except_actions before_action :issue, unless: ->(c) { c.issue_except_actions.include?(c.action_name.to_sym) }
before_action :set_issuables_index, only: set_issuables_index_only_actions before_action :set_issuables_index, if: ->(c) { c.set_issuables_index_only_actions.include?(c.action_name.to_sym) }
# Allow write(create) issue # Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create] before_action :authorize_create_issue!, only: [:new, :create]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment