Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 18:56:11 +01:00

Fixes repo membership check in API (#4341)

Untested, since I can't compile (yet).
This commit is contained in:
Nicolas Da Mutten 2018-07-05 09:14:56 +02:00 committed by Lunny Xiao
parent f035dcd4f2
commit e07d3ad0fc

View file

@ -133,7 +133,7 @@ func IsMember(ctx *context.APIContext) {
ctx.Error(500, "IsOrgMember", err) ctx.Error(500, "IsOrgMember", err)
return return
} else if userIsMember { } else if userIsMember {
userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(ctx.User.ID) userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(userToCheck.ID)
if err != nil { if err != nil {
ctx.Error(500, "IsOrgMember", err) ctx.Error(500, "IsOrgMember", err)
} else if userToCheckIsMember { } else if userToCheckIsMember {