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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1994,6 +1997,10 @@ private void validateRootVolumeDetachAttach(VolumeVO 
volume, UserVmVO vm) {
 
     @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription 
= "detaching volume")
     public Volume detachVolumeViaDestroyVM(long vmId, long volumeId) {
+        Account caller = CallContext.current().getCallingAccount();
+        Volume volume = _volsDao.findById(volumeId);
+        // Permissions check
+        _accountMgr.checkAccess(caller, null, true, volume);

Review comment:
       @sureshanaparti  got it and see the new commit




-- 
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