diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 19:42:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-13 19:42:17 +0300 |
commit | 47d6f70528dd4b41739c0a6767f74a8a40d9aaaa (patch) | |
tree | 31107b5a2fead4edd1b2c05d74c242fe2495c94c | |
parent | 8ff171f62849d5e418847c1751a802f93604cc61 (diff) | |
download | gitlab-ce-47d6f70528dd4b41739c0a6767f74a8a40d9aaaa.tar.gz |
Add /api/users test for admin role. Updated CHANGELOG
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | spec/requests/api/users_spec.rb | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 4a299827c11..c353c3b770c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -35,6 +35,7 @@ v 7.0.0 - Be more selective when killing stray Sidekiqs - Check LDAP user filter during sign-in - Remove wall feature (no data loss - you can take it from database) + - Dont expose user emails via API unless you are admin v 6.9.2 - Revert the commit that broke the LDAP user filter diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index c4728431ec5..c3eec56d133 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -23,6 +23,17 @@ describe API::API, api: true do json_response.first['username'].should == user.username end end + + context "when admin" do + it "should return an array of users" do + get api("/users", admin) + response.status.should == 200 + json_response.should be_an Array + json_response.first.keys.should include 'email' + json_response.first.keys.should include 'extern_uid' + json_response.first.keys.should include 'can_create_project' + end + end end describe "GET /users/:id" do |