mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 16:26:03 +01:00
Adds user status to users list API (#38948).
git-svn-id: https://svn.redmine.org/redmine/trunk@22637 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -13,6 +13,7 @@ api.array :users, api_meta(:total_count => @user_count, :offset => @offset, :lim
|
||||
api.passwd_changed_on user.passwd_changed_on
|
||||
api.avatar_url gravatar_url(user.mail, {rating: nil, size: nil, default: Setting.gravatar_default}) if Setting.gravatar_enabled?
|
||||
api.twofa_scheme user.twofa_scheme
|
||||
api.status user.status
|
||||
|
||||
render_api_custom_values user.visible_custom_field_values, api
|
||||
end
|
||||
|
||||
@@ -70,6 +70,7 @@ class Redmine::ApiTest::UsersTest < Redmine::ApiTest::Base
|
||||
json['users'].zip(users) do |user_json, user|
|
||||
assert_equal user.id, user_json['id']
|
||||
assert_equal user.updated_on.iso8601, user_json['updated_on']
|
||||
assert_equal user.status, user_json['status']
|
||||
|
||||
# No one has changed password.
|
||||
assert_nil user_json['passwd_changed_on']
|
||||
|
||||
Reference in New Issue
Block a user