diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-04-18 08:20:58 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-04-18 08:20:58 +0200 |
commit | 613ce6446e76bc0544c8abe8611c3963871726b0 (patch) | |
tree | 04e3a71535c464415a1063e4fc60a6cc1a1116fe | |
parent | ce02daea08c4cc7bc5e65e56f9b3d744a2e1faa6 (diff) | |
download | gitlab-ce-613ce6446e76bc0544c8abe8611c3963871726b0.tar.gz |
Aligned IssuesController implementation with EE
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 3d16a368f23..2ef5c207d67 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -10,11 +10,11 @@ class Projects::IssuesController < Projects::ApplicationController include SpammableActions include RecordUserLastActivity - def self.issue_except_actions + def issue_except_actions %i[index calendar new create bulk_update import_csv] end - def self.set_issuables_index_only_actions + def set_issuables_index_only_actions %i[index calendar] end @@ -25,9 +25,9 @@ class Projects::IssuesController < Projects::ApplicationController before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update] 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 before_action :authorize_create_issue!, only: [:new, :create] |