Skip to content

Commit

Permalink
fix access denied error when using search filter
Browse files Browse the repository at this point in the history
  • Loading branch information
AreejNour committed Apr 23, 2024
1 parent 37726f4 commit f558519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_admin/resource_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def restrict_format_access!
unless request.format.html?
presenter = active_admin_config.get_page_presenter(:index)
download_formats = (presenter || {}).fetch(:download_links, active_admin_config.namespace.download_links)
unless build_download_formats(download_formats).include?(request.format.symbol)
if !build_download_formats(download_formats).include?(request.format.symbol) && !(request.format.symbol == :json && CGI.parse(request.query_string).key?('q[combinator]'))
raise ActiveAdmin::AccessDenied.new(current_active_admin_user, :index)
end
end
Expand Down

0 comments on commit f558519

Please sign in to comment.