Browse Source

Adds user status to users list API (#38948).

git-svn-id: https://svn.redmine.org/redmine/trunk@22637 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/145/merge
Marius Balteanu 3 months ago
parent
commit
1e71db421a
2 changed files with 2 additions and 0 deletions
  1. 1
    0
      app/views/users/index.api.rsb
  2. 1
    0
      test/integration/api_test/users_test.rb

+ 1
- 0
app/views/users/index.api.rsb View File

@@ -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

+ 1
- 0
test/integration/api_test/users_test.rb View File

@@ -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']

Loading…
Cancel
Save