summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-02-09 22:54:53 +0100
committerGitHub <noreply@github.com>2020-02-09 23:54:53 +0200
commit585316f3bf567f8714054babab91280afdaa332b (patch)
tree2be2fd0774afaccbb597440c6071d0e4488bd791
parente414fc18a9bb787f4cec39de4886835102e66775 (diff)
downloadgitea-585316f3bf567f8714054babab91280afdaa332b.tar.gz
gitea-585316f3bf567f8714054babab91280afdaa332b.zip
[API] let admin check org membership on other users (#10201)
* fix * fix lint on master Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--routers/api/v1/org/member.go2
1 files changed, 1 insertions, 1 deletions
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)