sureshanaparti commented on a change in pull request #4859:
URL: https://github.com/apache/cloudstack/pull/4859#discussion_r607802370



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -2556,7 +2566,7 @@ private Snapshot takeSnapshotInternal(Long volumeId, Long 
policyId, Long snapsho
         if (volume.getState() != Volume.State.Ready) {
             throw new InvalidParameterValueException("VolumeId: " + volumeId + 
" is not in " + Volume.State.Ready + " state but " + volume.getState() + ". 
Cannot take snapshot.");
         }
-
+        _accountMgr.checkAccess(caller, null, true, volume);

Review comment:
       it's better to call this before checking for the volume state.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to