Merge pull request #2765 from ywk253100/170712_member

Fix bug in GET member API
This commit is contained in:
Daniel Jiang 2017-07-13 16:47:19 +08:00 committed by GitHub
commit 0501f52cda

View File

@ -78,8 +78,8 @@ func (pma *ProjectMemberAPI) Prepare() {
}
pma.project = project
if pma.Ctx.Input.IsGet() && !pma.SecurityCtx.HasReadPerm(pid) ||
!pma.SecurityCtx.HasAllPerm(pid) {
if !(pma.Ctx.Input.IsGet() && pma.SecurityCtx.HasReadPerm(pid) ||
pma.SecurityCtx.HasAllPerm(pid)) {
pma.HandleForbidden(pma.SecurityCtx.GetUsername())
return
}