yvsubhash commented on a change in pull request #905: BUG-ID: CLOUDSTACK-8922:  
Unable to delete IP tag
URL: https://github.com/apache/cloudstack/pull/905#discussion_r152728899
 
 

 ##########
 File path: server/src/com/cloud/tags/TaggedResourceManagerImpl.java
 ##########
 @@ -296,21 +296,9 @@ public String getUuid(String resourceId, 
ResourceObjectType resourceType) {
     @DB
     @ActionEvent(eventType = EventTypes.EVENT_TAGS_DELETE, eventDescription = 
"deleting resource tags")
     public boolean deleteTags(List<String> resourceIds, ResourceObjectType 
resourceType, Map<String, String> tags) {
-        Account caller = CallContext.current().getCallingAccount();
-
-        SearchBuilder<ResourceTagVO> sb = 
_resourceTagDao.createSearchBuilder();
-        sb.and().op("resourceId", sb.entity().getResourceId(), 
SearchCriteria.Op.IN);
-        sb.or("resourceUuid", sb.entity().getResourceUuid(), 
SearchCriteria.Op.IN);
-        sb.cp();
-        sb.and("resourceType", sb.entity().getResourceType(), 
SearchCriteria.Op.EQ);
-
-        SearchCriteria<ResourceTagVO> sc = sb.create();
-        sc.setParameters("resourceId", resourceIds.toArray());
-        sc.setParameters("resourceUuid", resourceIds.toArray());
-        sc.setParameters("resourceType", resourceType);
 
-        List<? extends ResourceTag> resourceTags = _resourceTagDao.search(sc, 
null);
-        ;
+        Account caller = CallContext.current().getCallingAccount();
 
 Review comment:
   It seems be about caller. that got used in 
    _accountMgr.checkAccess(caller, null, false, owner);

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to