Merge pull request #3174 from adamwg/manifest-delete-by-tag

manifests: Return UNSUPPORTED when deleting manifests by tag
This commit is contained in:
Milos Gajdos 2021-03-01 17:21:03 +00:00 committed by GitHub
commit 17ab8afeec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -485,6 +485,11 @@ func (imh *manifestHandler) applyResourcePolicy(manifest distribution.Manifest)
func (imh *manifestHandler) DeleteManifest(w http.ResponseWriter, r *http.Request) {
dcontext.GetLogger(imh).Debug("DeleteImageManifest")
if imh.Tag != "" {
imh.Errors = append(imh.Errors, errcode.ErrorCodeUnsupported)
return
}
manifests, err := imh.Repository.Manifests(imh)
if err != nil {
imh.Errors = append(imh.Errors, err)