From 6e20058fb7fd482b4bbcd30f3c78aaa59c6c09d3 Mon Sep 17 00:00:00 2001 From: Saksham Srivastava Date: Mon, 2 Jun 2014 15:51:06 +0530 Subject: [PATCH] CLOUDSTACK-6508: impossible to list projects from API with domainid set (cherry picked from commit 19b72d6cf57665fc3935fdd7f7e9dad9117f0616) Signed-off-by: Rohit Yadav --- server/src/com/cloud/api/query/QueryManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 1182be575a6..18a155f9805 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -1298,7 +1298,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { throw new PermissionDeniedException("Can't list account " + accountName + " projects; unauthorized"); } - if (domainId != null && domainId.equals(caller.getDomainId())) { + if (domainId != null && !domainId.equals(caller.getDomainId())) { throw new PermissionDeniedException("Can't list domain id= " + domainId + " projects; unauthorized"); }