@@ -367,7 +367,7 @@ public VirtualMachineTemplate prepareTemplate(long templateId, long zoneId) {
367367 throw new InvalidParameterValueException ("Unable to find template id=" + templateId );
368368 }
369369
370- _accountMgr .checkAccess (CallContext .current ().getCallingAccount (), AccessType .ModifyEntry , true , vmTemplate );
370+ _accountMgr .checkAccess (CallContext .current ().getCallingAccount (), AccessType .OperateEntry , true , vmTemplate );
371371
372372 prepareTemplateInAllStoragePools (vmTemplate , zoneId );
373373 return vmTemplate ;
@@ -413,7 +413,7 @@ private String extract(Account caller, Long templateId, String url, Long zoneId,
413413 throw new InvalidParameterValueException ("Unable to extract template id=" + templateId + " as it's not extractable" );
414414 }
415415
416- _accountMgr .checkAccess (caller , AccessType .ModifyEntry , true , template );
416+ _accountMgr .checkAccess (caller , AccessType .OperateEntry , true , template );
417417
418418 List <DataStore > ssStores = _dataStoreMgr .getImageStoresByScope (new ZoneScope (zoneId ));
419419
@@ -689,7 +689,7 @@ public VirtualMachineTemplate copyTemplate(CopyTemplateCmd cmd) throws StorageUn
689689 return template ;
690690 }
691691
692- _accountMgr .checkAccess (caller , AccessType .ModifyEntry , true , template );
692+ _accountMgr .checkAccess (caller , AccessType .OperateEntry , true , template );
693693
694694 boolean success = copy (userId , template , srcSecStore , dstZone );
695695
@@ -1028,7 +1028,7 @@ public boolean deleteTemplate(DeleteTemplateCmd cmd) {
10281028 throw new InvalidParameterValueException ("unable to find template with id " + templateId );
10291029 }
10301030
1031- _accountMgr .checkAccess (caller , AccessType .ModifyEntry , true , template );
1031+ _accountMgr .checkAccess (caller , AccessType .OperateEntry , true , template );
10321032
10331033 if (template .getFormat () == ImageFormat .ISO ) {
10341034 throw new InvalidParameterValueException ("Please specify a valid template." );
@@ -1051,7 +1051,7 @@ public boolean deleteIso(DeleteIsoCmd cmd) {
10511051 throw new InvalidParameterValueException ("unable to find iso with id " + templateId );
10521052 }
10531053
1054- _accountMgr .checkAccess (caller , AccessType .ModifyEntry , true , template );
1054+ _accountMgr .checkAccess (caller , AccessType .OperateEntry , true , template );
10551055
10561056 if (template .getFormat () != ImageFormat .ISO ) {
10571057 throw new InvalidParameterValueException ("Please specify a valid iso." );
@@ -1752,7 +1752,7 @@ private VMTemplateVO updateTemplateOrIso(BaseUpdateTemplateOrIsoCmd cmd) {
17521752 }
17531753
17541754 // do a permission check
1755- _accountMgr .checkAccess (account , AccessType .ModifyEntry , true , template );
1755+ _accountMgr .checkAccess (account , AccessType .OperateEntry , true , template );
17561756 if (cmd .isRoutingType () != null ) {
17571757 if (!_accountService .isRootAdmin (account .getId ())) {
17581758 throw new PermissionDeniedException ("Parameter isrouting can only be specified by a Root Admin, permission denied" );
0 commit comments