Commit e87c6675 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix non-HTML requests with vue_issues_list

This fixes a regression from
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/79408

We still need to query the issues for the ATOM feed even if
vue_issues_list is enabled
parent a635fd2d
......@@ -210,7 +210,7 @@ class GroupsController < Groups::ApplicationController
end
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
.non_archived
......@@ -220,7 +220,6 @@ class GroupsController < Groups::ApplicationController
respond_to do |format|
format.html
format.atom { render layout: 'xml.atom' }
end
end
......
......@@ -22,10 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController
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) }
before_action :set_issuables_index, if: ->(c) {
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))
}
before_action :set_issuables_index, if: ->(c) { SET_ISSUABLES_INDEX_ONLY_ACTIONS.include?(c.action_name.to_sym) }
# Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create]
......@@ -80,6 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController
attr_accessor :vulnerability_id
def index
set_issuables_index if !html_request? || Feature.disabled?(:vue_issues_list, project&.group, default_enabled: :yaml)
@issues = @issuables
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