From 585316f3bf567f8714054babab91280afdaa332b Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 9 Feb 2020 22:54:53 +0100 Subject: [PATCH] [API] let admin check org membership on other users (#10201) * fix * fix lint on master Co-authored-by: zeripath --- routers/api/v1/org/member.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go index 6450577f4c..267eda12ad 100644 --- a/routers/api/v1/org/member.go +++ b/routers/api/v1/org/member.go @@ -135,7 +135,7 @@ func IsMember(ctx *context.APIContext) { if err != nil { ctx.Error(http.StatusInternalServerError, "IsOrgMember", err) return - } else if userIsMember { + } else if userIsMember || ctx.User.IsAdmin { userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(userToCheck.ID) if err != nil { ctx.Error(http.StatusInternalServerError, "IsOrgMember", err)