mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 23:36:01 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user