summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2019-02-21 14:42:54 -0600
committertechknowlogick <matti@mdranta.net>2019-02-21 15:42:54 -0500
commit994b1be9d12cb5c100ab15091bf5e5856aa38ad3 (patch)
treebd55e40b285098f9335ac16430622e49b1cca60f /routers
parent477ef462510d69a8a31e008fb6e64059dc6cc148 (diff)
downloadgitea-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.go2
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
}