Commit 489fbffb authored by Imre Farkas's avatar Imre Farkas

Merge branch 'add-sign_in_count-to-user-api' into 'master'

Add sign_in_count to /users/:id API for admins

See merge request gitlab-org/gitlab!35726
parents 1b486454 4148da88
---
title: Add sign_in_count to /users/:id API for admins
merge_request: 35726
author: Luc Didry
type: changed
......@@ -314,7 +314,8 @@ Example Responses:
"current_sign_in_ip": "196.165.1.102",
"last_sign_in_ip": "172.127.2.22",
"plan": "gold",
"trial": true
"trial": true,
"sign_in_count": 1337
}
```
......
......@@ -6,6 +6,7 @@ module API
expose :highest_role
expose :current_sign_in_ip
expose :last_sign_in_ip
expose :sign_in_count
end
end
end
......
......@@ -64,6 +64,7 @@ RSpec.describe API::Users, :do_not_mock_admin_mode do
expect(json_response).to have_key('note')
expect(json_response['note']).to eq(user.note)
expect(json_response).to have_key('sign_in_count')
end
end
......@@ -72,6 +73,7 @@ RSpec.describe API::Users, :do_not_mock_admin_mode do
get api("/users/#{user.id}", user)
expect(json_response).not_to have_key('note')
expect(json_response).not_to have_key('sign_in_count')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment