diff --git a/doc/api/users.md b/doc/api/users.md index c05bcb3e5394e9cdba2c8ef0e50b89ead845f088..ee5e98a016c5d7805a8b8f8b859a6a4c8881d250 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -1,6 +1,7 @@ ## List users Get a list of users. +This function takes pagination parameters `page` and `per_page` to restrict the list of users. ``` GET /users diff --git a/lib/api/users.rb b/lib/api/users.rb index 125a8624021b83af0abb0b9f5090ff5ee1f0342a..4198387d403f05f5ea07b7535741b436d1bf7594 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -12,6 +12,7 @@ module Gitlab @users = User.scoped @users = @users.active if params[:active].present? @users = @users.search(params[:search]) if params[:search].present? + @users = paginate @users present @users, with: Entities::User end