1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Adds deprecation warning when an empty status param (status=) is used to get all users from API (#40099).

git-svn-id: https://svn.redmine.org/redmine/trunk@22633 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu 2024-01-25 15:31:49 +00:00
parent fcad042ed3
commit 7ad46f7e04

View File

@ -48,6 +48,7 @@ class UsersController < ApplicationController
# API backwards compatibility: handle legacy filter parameters
unless request.format.html?
if params.include?(:status) && params[:status].blank?
ActiveSupport::Deprecation.warn "Getting all users from API using an empty status param (status=) is deprecated and it will be removed in Redmine 6.0. Please use \"status=*\"."
@query.add_filter 'status', '*'
end
if name = params[:name].presence