mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 07:46:39 +00:00
Do not return 403 for HEAD
This commit is contained in:
parent
551ce63927
commit
f96bde1abb
|
@ -140,14 +140,10 @@ func (p *ProjectAPI) Head() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
userID := p.ValidateUser()
|
_ = p.ValidateUser()
|
||||||
if project == nil {
|
if project == nil {
|
||||||
p.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound))
|
p.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound))
|
||||||
}
|
}
|
||||||
|
|
||||||
if !checkProjectPermission(userID, project.ProjectID) {
|
|
||||||
p.CustomAbort(http.StatusForbidden, http.StatusText(http.StatusForbidden))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ...
|
// Get ...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user