aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-12-09 10:19:50 +0800
committerGitHub <noreply@github.com>2018-12-09 10:19:50 +0800
commitda5a0b8382c4b5c9913fa02d0a801e543e5a0699 (patch)
tree21f8907664280fb286b2e1bdcc7e81bc6e829be1 /routers/api
parent4b4453cb9226e1a5229b8bdbb91ecfbdfc64d87d (diff)
downloadgitea-da5a0b8382c4b5c9913fa02d0a801e543e5a0699.tar.gz
gitea-da5a0b8382c4b5c9913fa02d0a801e543e5a0699.zip
add tests for api user orgs (#5494)
* add tests for api user orgs * add permission for admin to list user's orgs even he is a private user of org
Diffstat (limited to 'routers/api')
-rw-r--r--routers/api/v1/org/org.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go
index 93c2ed7a88..c300c28141 100644
--- a/routers/api/v1/org/org.go
+++ b/routers/api/v1/org/org.go
@@ -60,7 +60,7 @@ func ListUserOrgs(ctx *context.APIContext) {
if ctx.Written() {
return
}
- listUserOrgs(ctx, u, false)
+ listUserOrgs(ctx, u, ctx.User.IsAdmin)
}
// Create api for create organization