mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 9777: only allow to delete snapshot in BackedUp status
status 9777: resolved fixed
This commit is contained in:
parent
15302b03da
commit
313b624373
@ -681,6 +681,9 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||||||
if (snapshotCheck == null) {
|
if (snapshotCheck == null) {
|
||||||
throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId);
|
throw new InvalidParameterValueException("unable to find a snapshot with id " + snapshotId);
|
||||||
}
|
}
|
||||||
|
if( !Status.BackedUp.equals(snapshotCheck.getStatus() ) ) {
|
||||||
|
throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is not in BackedUp Status");
|
||||||
|
}
|
||||||
|
|
||||||
_accountMgr.checkAccess(caller, null, snapshotCheck);
|
_accountMgr.checkAccess(caller, null, snapshotCheck);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user