]> source.dussan.org Git - redmine.git/commitdiff
Adds user status to users list API (#38948).
authorMarius Balteanu <marius.balteanu@zitec.com>
Thu, 25 Jan 2024 16:40:13 +0000 (16:40 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Thu, 25 Jan 2024 16:40:13 +0000 (16:40 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22637 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/users/index.api.rsb
test/integration/api_test/users_test.rb

index b617ea91c8e02fc887d11cca9e2fb67ae9ab23cc..6ce38a58d7b48361feb0798739f7bf40105468f7 100644 (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
index 42cb5ce444ead7b112d7e40dee1f27ac397f4cce..0342b3cdd254c408642dd3d41546ba6c12ea5274 100644 (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']