diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-09 10:19:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-09 10:19:50 +0800 |
commit | da5a0b8382c4b5c9913fa02d0a801e543e5a0699 (patch) | |
tree | 21f8907664280fb286b2e1bdcc7e81bc6e829be1 /routers/api | |
parent | 4b4453cb9226e1a5229b8bdbb91ecfbdfc64d87d (diff) | |
download | gitea-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.go | 2 |
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 |