CS-15579 - perform check when account/domainId is passed to list call by the regular user

This commit is contained in:
Alena Prokharchyk 2012-07-13 15:56:51 -07:00
parent 3d7f6a35ad
commit 7a5efcc2e8
1 changed files with 4 additions and 1 deletions

View File

@ -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);