Merge branch 'ce-issue-10671' into 'master'
CE part for extract EE specific lines from issue.rb See merge request gitlab-org/gitlab-ce!27481
This commit is contained in:
commit
ace5c78978
2 changed files with 8 additions and 8 deletions
|
@ -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]
|
||||
|
|
|
@ -128,10 +128,6 @@ module Issuable
|
|||
assignees.count > 1
|
||||
end
|
||||
|
||||
def milestone_available?
|
||||
project_id == milestone&.project_id || project.ancestors_upto.compact.include?(milestone&.group)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def milestone_is_valid
|
||||
|
@ -277,6 +273,10 @@ module Issuable
|
|||
end
|
||||
end
|
||||
|
||||
def milestone_available?
|
||||
project_id == milestone&.project_id || project.ancestors_upto.compact.include?(milestone&.group)
|
||||
end
|
||||
|
||||
def assignee_or_author?(user)
|
||||
author_id == user.id || assignees.exists?(user.id)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue