Skip to content

Commit

Permalink
Fix ListUserOrgs (#12910)
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>
  • Loading branch information
a1012112796 and lafriks authored Sep 20, 2020
1 parent 23f064e commit b74ed16
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 @@ -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
Expand Down

0 comments on commit b74ed16

Please sign in to comment.