diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-05-08 15:17:32 -0400 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-05-08 22:17:32 +0300 |
commit | 6db3dc7c021e05658f063e577e2ea972b8bad80d (patch) | |
tree | 9f8bd8115bc21dd823601bd2c430a1069590b06c /routers/api/v1/user | |
parent | d8b2ed6627d60d3573ba4864e72601230e1d0eaf (diff) | |
download | gitea-6db3dc7c021e05658f063e577e2ea972b8bad80d.tar.gz gitea-6db3dc7c021e05658f063e577e2ea972b8bad80d.zip |
Fixes #6881 - API users search fix (#6882)
Diffstat (limited to 'routers/api/v1/user')
-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 2e4ae273e5..76b4fc8dcc 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -67,7 +67,7 @@ func Search(ctx *context.APIContext) { results := make([]*api.User, len(users)) for i := range users { - results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User.IsAdmin) + results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) } ctx.JSON(200, map[string]interface{}{ |