summaryrefslogtreecommitdiffstats
path: root/routers/api
diff options
context:
space:
mode:
authorNicolas Da Mutten <nicolas@damutten.ch>2018-07-05 09:14:56 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2018-07-05 15:14:56 +0800
commite07d3ad0fcdb27f27fb063c287ce5b0f60724286 (patch)
tree65e9ffe4f0d8606a2b08a09f422a8041cea71df4 /routers/api
parentf035dcd4f221a631cc499d90661237d6cf601843 (diff)
downloadgitea-e07d3ad0fcdb27f27fb063c287ce5b0f60724286.tar.gz
gitea-e07d3ad0fcdb27f27fb063c287ce5b0f60724286.zip
Fixes repo membership check in API (#4341)
Untested, since I can't compile (yet).
Diffstat (limited to 'routers/api')
-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 0cc5317802..65754b88ec 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -133,7 +133,7 @@ func IsMember(ctx *context.APIContext) {
ctx.Error(500, "IsOrgMember", err)
return
} else if userIsMember {
- userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(ctx.User.ID)
+ userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(userToCheck.ID)
if err != nil {
ctx.Error(500, "IsOrgMember", err)
} else if userToCheckIsMember {