Skip to content

Commit

Permalink
Fix ListUserOrgs (#12910) (#12915)
Browse files Browse the repository at this point in the history
fix #12891

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

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

Co-authored-by: Lauris BH <lauris@nix.lv>
  • Loading branch information
a1012112796 and lafriks authored Sep 21, 2020
1 parent 0917830 commit 470b195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/org/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 470b195

Please sign in to comment.