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:
parent
4b4453cb92
commit
da5a0b8382
2 changed files with 64 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue