diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-02-21 14:42:54 -0600 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-21 15:42:54 -0500 |
commit | 994b1be9d12cb5c100ab15091bf5e5856aa38ad3 (patch) | |
tree | bd55e40b285098f9335ac16430622e49b1cca60f /routers | |
parent | 477ef462510d69a8a31e008fb6e64059dc6cc148 (diff) | |
download | gitea-994b1be9d12cb5c100ab15091bf5e5856aa38ad3.tar.gz gitea-994b1be9d12cb5c100ab15091bf5e5856aa38ad3.zip |
Admins can now do unlimited page size user search (listAllUsers & listAllOrgs) (#6143)
Non-admins will default to 10 page size
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/user/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index f76b443661..40d1b76805 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -55,7 +55,7 @@ func Search(ctx *context.APIContext) { Type: models.UserTypeIndividual, PageSize: com.StrTo(ctx.Query("limit")).MustInt(), } - if opts.PageSize == 0 { + if opts.PageSize <= 0 { opts.PageSize = 10 } |