summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-04-12 12:04:33 -0300
committerFelipe Artur <felipefac@gmail.com>2016-04-18 11:12:28 -0300
commit820c08cefd78e593e94012061be29000d523ffd0 (patch)
treef50d16d6b6d7abe68e891f930d805091e5c5fcc8 /lib/api/users.rb
parent7d54e721da0ccd21f0150bbb6ab60b51970033c2 (diff)
downloadgitlab-ce-820c08cefd78e593e94012061be29000d523ffd0.tar.gz
Fix documentation and improve permissions code
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 9647a40686e..315268fc0ca 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -11,7 +11,7 @@ module API
# GET /users?search=Admin
# GET /users?username=root
get do
- if !current_user && public_access_restricted?
+ unless can?(current_user, :read_users_list, nil)
render_api_error!("Not authorized.", 403)
end