Updated Branches: refs/heads/master 3d7f6a35a -> 7a5efcc2e
CS-15579 - perform check when account/domainId is passed to list call by the regular user Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7a5efcc2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7a5efcc2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7a5efcc2 Branch: refs/heads/master Commit: 7a5efcc2e8abf17d4d57d2cf889097f6b1960800 Parents: 3d7f6a3 Author: Alena Prokharchyk <[email protected]> Authored: Fri Jul 13 15:56:51 2012 -0700 Committer: Alena Prokharchyk <[email protected]> Committed: Fri Jul 13 15:59:15 2012 -0700 ---------------------------------------------------------------------- server/src/com/cloud/user/AccountManagerImpl.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7a5efcc2/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 2338f05..e66b886 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -2146,7 +2146,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag } @Override - public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List<Long> permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject, + public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List<Long> + permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject, boolean listAll, boolean forProjectInvitation) { Long domainId = domainIdRecursiveListProject.first(); @@ -2172,6 +2173,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag } if (userAccount != null) { + checkAccess(caller, null, false, userAccount); + //check permissions permittedAccounts.add(userAccount.getId()); } else { throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId);
