Commit 8463d7ac authored by Mark Chao's avatar Mark Chao

Merge branch 'fix-atom-feed-vue-issues-list' into 'master'

Fix non-HTML requests with vue_issues_list

See merge request gitlab-org/gitlab!80162
parents 1ca17f9b e87c6675
...@@ -210,7 +210,7 @@ class GroupsController < Groups::ApplicationController ...@@ -210,7 +210,7 @@ class GroupsController < Groups::ApplicationController
end end
def issues def issues
return super if Feature.disabled?(:vue_issues_list, group, default_enabled: :yaml) return super if !html_request? || Feature.disabled?(:vue_issues_list, group, default_enabled: :yaml)
@has_issues = IssuesFinder.new(current_user, group_id: group.id).execute @has_issues = IssuesFinder.new(current_user, group_id: group.id).execute
.non_archived .non_archived
...@@ -220,7 +220,6 @@ class GroupsController < Groups::ApplicationController ...@@ -220,7 +220,6 @@ class GroupsController < Groups::ApplicationController
respond_to do |format| respond_to do |format|
format.html format.html
format.atom { render layout: 'xml.atom' }
end end
end end
......
...@@ -22,10 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -22,10 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :issue, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) } before_action :issue, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) }
after_action :log_issue_show, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) } after_action :log_issue_show, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) }
before_action :set_issuables_index, if: ->(c) { before_action :set_issuables_index, if: ->(c) { SET_ISSUABLES_INDEX_ONLY_ACTIONS.include?(c.action_name.to_sym) }
SET_ISSUABLES_INDEX_ONLY_ACTIONS.include?(c.action_name.to_sym) ||
(c.action_name.to_sym == :index && Feature.disabled?(:vue_issues_list, project&.group, default_enabled: :yaml))
}
# Allow write(create) issue # Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create] before_action :authorize_create_issue!, only: [:new, :create]
...@@ -80,6 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -80,6 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController
attr_accessor :vulnerability_id attr_accessor :vulnerability_id
def index def index
set_issuables_index if !html_request? || Feature.disabled?(:vue_issues_list, project&.group, default_enabled: :yaml)
@issues = @issuables @issues = @issuables
respond_to do |format| respond_to do |format|
......
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