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
This commit is contained in:
Lunny Xiao authored and GitHub committed 2018-12-09 10:19:50 +08:00
1 parent 4b4453cb92
commit da5a0b8382
2 files changed
+64 -1

No files matched your search

+1 -1
View File
@@ -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