diff options
author | 6543 <6543@obermui.de> | 2020-02-09 22:54:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 23:54:53 +0200 |
commit | 585316f3bf567f8714054babab91280afdaa332b (patch) | |
tree | 2be2fd0774afaccbb597440c6071d0e4488bd791 | |
parent | e414fc18a9bb787f4cec39de4886835102e66775 (diff) | |
download | gitea-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.go | 2 |
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) |