mirror of https://github.com/apache/cloudstack.git
CS-15579 - perform check when account/domainId is passed to list call by the regular user
This commit is contained in:
parent
3d7f6a35ad
commit
7a5efcc2e8
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue