Skip to content

Commit

Permalink
[API] let admin check org membership on other users (#10201)
Browse files Browse the repository at this point in the history
* fix

* fix lint on master

Co-authored-by: zeripath <art27@cantab.net>
  • Loading branch information
6543 and zeripath authored Feb 9, 2020
1 parent e414fc1 commit 585316f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/org/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 585316f

Please sign in to comment.