diff options
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 5b9d9a71be4..88bca235692 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -1,10 +1,9 @@ module API class Users < Grape::API include PaginationParams + include APIGuard - before do - allow_access_with_scope :read_user if request.get? - end + allow_access_with_scope :read_user, if: -> (request) { request.get? } resource :users, requirements: { uid: /[0-9]*/, id: /[0-9]*/ } do before do |