Skip to content

Commit 7a5efcc

Browse files
author
Alena Prokharchyk
committed
CS-15579 - perform check when account/domainId is passed to list call by the regular user
1 parent 3d7f6a3 commit 7a5efcc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎server/src/com/cloud/user/AccountManagerImpl.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,8 @@ public void buildACLSearchCriteria(SearchCriteria<? extends ControlledEntity> sc
21462146
}
21472147

21482148
@Override
2149-
public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List<Long> permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject,
2149+
public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List<Long>
2150+
permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject,
21502151
boolean listAll, boolean forProjectInvitation) {
21512152
Long domainId = domainIdRecursiveListProject.first();
21522153

@@ -2172,6 +2173,8 @@ public void buildACLSearchParameters(Account caller, Long id, String accountName
21722173
}
21732174

21742175
if (userAccount != null) {
2176+
checkAccess(caller, null, false, userAccount);
2177+
//check permissions
21752178
permittedAccounts.add(userAccount.getId());
21762179
} else {
21772180
throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId);

0 commit comments

Comments
 (0)