CLOUDSTACK-6350: IAM - Listing of VM using uuid when owner account of
this Vm is deleted results is VM not being returned.But list VM with
listAll=true is able to return this VM.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c4b0a1e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c4b0a1e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c4b0a1e2

Branch: refs/heads/master
Commit: c4b0a1e2d941ba63f0a50a5901c696ff689540d1
Parents: 5d59fc7
Author: Min Chen <[email protected]>
Authored: Mon Apr 7 22:23:21 2014 -0700
Committer: Min Chen <[email protected]>
Committed: Thu Apr 17 18:06:29 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/user/AccountManagerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c4b0a1e2/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java 
b/server/src/com/cloud/user/AccountManagerImpl.java
index 047f547..0d4b72d 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -2231,8 +2231,8 @@ public class AccountManagerImpl extends ManagerBase 
implements AccountManager, M
                 owner = caller;
             }
             AccessType accessType = AccessType.UseEntry;
-            if (listAll) {
-                // listAll = true should show all resources that owner has 
ListEntry access type
+            if (listAll || id != null) {
+                // listAll = true or id given should show all resources that 
owner has ListEntry access type.
                 accessType = AccessType.ListEntry;
             }
             
domainIdRecursiveListProject.third(Project.ListProjectResourcesCriteria.SkipProjectResources);

Reply via email to