Skip to content

Commit b74ed16

Browse files
a1012112796lafriks
andauthored
Fix ListUserOrgs (#12910)
fix #12891 Signed-off-by: a1012112796 <[email protected]> Co-authored-by: Lauris BH <[email protected]>
1 parent 23f064e commit b74ed16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/org/org.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func ListUserOrgs(ctx *context.APIContext) {
8585
if ctx.Written() {
8686
return
8787
}
88-
listUserOrgs(ctx, u, ctx.User.IsAdmin)
88+
listUserOrgs(ctx, u, ctx.User != nil && (ctx.User.IsAdmin || ctx.User.ID == u.ID))
8989
}
9090

9191
// GetAll return list of all public organizations

0 commit comments

Comments
 (0)