lujiefsi commented on a change in pull request #4859:
URL: https://github.com/apache/cloudstack/pull/4859#discussion_r610539467
##########
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:
destroyVolume alerady have an access check, in method
"retrieveAndValidateVolume"
--
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]