Do not return 403 for HEAD

This commit is contained in:
Tan Jiang 2017-03-31 14:36:20 +08:00
parent 551ce63927
commit f96bde1abb

View File

@ -140,14 +140,10 @@ func (p *ProjectAPI) Head() {
return
}
userID := p.ValidateUser()
_ = p.ValidateUser()
if project == nil {
p.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound))
}
if !checkProjectPermission(userID, project.ProjectID) {
p.CustomAbort(http.StatusForbidden, http.StatusText(http.StatusForbidden))
}
}
// Get ...