Browse Source

Fix ListUserOrgs (#12910) (#12915)

fix #12891

Signed-off-by: a101211279 <1012112796@qq.com>

Co-authored-by: Lauris BH <lauris@nix.lv>

Co-authored-by: Lauris BH <lauris@nix.lv>
tags/v1.12.5
赵智超 3 years ago
parent
commit
470b195da1
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      routers/api/v1/org/org.go

+ 1
- 1
routers/api/v1/org/org.go View File

@@ -84,7 +84,7 @@ func ListUserOrgs(ctx *context.APIContext) {
if ctx.Written() {
return
}
listUserOrgs(ctx, u, ctx.User.IsAdmin)
listUserOrgs(ctx, u, ctx.User != nil && (ctx.User.IsAdmin || ctx.User.ID == u.ID))
}

// GetAll return list of all public organizations

Loading…
Cancel
Save