diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-25 10:57:32 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-25 10:57:32 +0000 |
commit | 6dc424c949ab3de9395d821b05d2e1cc5f632ed2 (patch) | |
tree | c74460ecbf621cf8560053560b787cddd9cda6b5 /spec/requests/api/keys_spec.rb | |
parent | 9a905e1b9f9575bb8d637560cb3c59fd82079d2d (diff) | |
parent | 0befa887b52613831809380d2cd5d3d2bff88220 (diff) | |
download | gitlab-ce-6dc424c949ab3de9395d821b05d2e1cc5f632ed2.tar.gz |
Merge branch '29903-remove-user-is-admin-flag-from-api' into 'master'
Don't display the `is_admin?` flag for user API responses
Closes #29903
See merge request !10846
Diffstat (limited to 'spec/requests/api/keys_spec.rb')
-rw-r--r-- | spec/requests/api/keys_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/requests/api/keys_spec.rb b/spec/requests/api/keys_spec.rb index b5586088485..ab957c72984 100644 --- a/spec/requests/api/keys_spec.rb +++ b/spec/requests/api/keys_spec.rb @@ -32,6 +32,12 @@ describe API::Keys do expect(json_response['user']['id']).to eq(user.id) expect(json_response['user']['username']).to eq(user.username) end + + it "does not include the user's `is_admin` flag" do + get api("/keys/#{key.id}", admin) + + expect(json_response['user']['is_admin']).to be_nil + end end end end |