diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 6671ab9ba6f..06def7f35ca 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -1307,7 +1307,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"); }