Remove deprecated @status=@ param used to get all users. @status=*@ should be used now. (#40124).

git-svn-id: https://svn.redmine.org/redmine/trunk@22635 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2024-01-25 15:38:39 +00:00
parent 7ad46f7e04
commit 5676499ceb
2 changed files with 0 additions and 11 deletions

View File

@@ -47,10 +47,6 @@ 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
@query.add_filter 'name', '~', [name]
end

View File

@@ -97,13 +97,6 @@ class Redmine::ApiTest::UsersTest < Redmine::ApiTest::Base
users = User.logged
assert_equal users.size, json['users'].size
get '/users.json', headers: credentials('admin'), params: { status: ''}
assert_response :success
json = ActiveSupport::JSON.decode(response.body)
assert json.key?('users')
users = User.logged
assert_equal users.size, json['users'].size
get '/users.json', headers: credentials('admin'), params: { name: 'jsmith' }
assert_response :success
json = ActiveSupport::JSON.decode(response.body)