Browse Source

Fix ListUserOrgs (#12910)

fix #12891

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

Co-authored-by: Lauris BH <lauris@nix.lv>
pull/12665/head
赵智超 1 year ago
committed by GitHub
parent
commit
b74ed16c41
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      routers/api/v1/org/org.go

2
routers/api/v1/org/org.go

@ -85,7 +85,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