1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
2018-12-09 10:19:50 +08:00
committed by GitHub
parent 4b4453cb92
commit da5a0b8382
2 changed files with 64 additions and 1 deletions

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