fix: disable delete standard image

This commit is contained in:
Qiu Jian
2020-05-16 00:34:54 +08:00
parent fe055916c3
commit ed5463ca68
+3
View File
@@ -694,6 +694,9 @@ func (self *SImage) ValidateDeleteCondition(ctx context.Context) error {
if self.IsGuestImage.IsTrue() {
return httperrors.NewForbiddenError("image is the part of guest image")
}
if self.IsStandard.IsTrue() {
return httperrors.NewForbiddenError("image is standard")
}
// if self.IsShared() {
// return httperrors.NewForbiddenError("image is shared")
// }