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
a8c883ba53
commit
c17bca4088
|
|
@ -2198,7 +2198,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();
|
||||
|
||||
|
|
@ -2224,6 +2225,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
}
|
||||
|
||||
if (userAccount != null) {
|
||||
checkAccess(caller, null, false, userAccount);
|
||||
//check permissions
|
||||
permittedAccounts.add(userAccount.getId());
|
||||
} else {
|
||||
List<IdentityProxy> idList = new ArrayList<IdentityProxy>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue