Commit 47d6f705 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add /api/users test for admin role. Updated CHANGELOG

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 8ff171f6
...@@ -35,6 +35,7 @@ v 7.0.0 ...@@ -35,6 +35,7 @@ v 7.0.0
- Be more selective when killing stray Sidekiqs - Be more selective when killing stray Sidekiqs
- Check LDAP user filter during sign-in - Check LDAP user filter during sign-in
- Remove wall feature (no data loss - you can take it from database) - 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 v 6.9.2
- Revert the commit that broke the LDAP user filter - Revert the commit that broke the LDAP user filter
......
...@@ -23,6 +23,17 @@ describe API::API, api: true do ...@@ -23,6 +23,17 @@ describe API::API, api: true do
json_response.first['username'].should == user.username json_response.first['username'].should == user.username
end end
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 end
describe "GET /users/:id" do describe "GET /users/:id" do
......
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