Add /api/users test for admin role. Updated CHANGELOG
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
8ff171f628
commit
47d6f70528
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue