mirror of https://github.com/apache/cloudstack.git
API: Fix listing Userdata by keyword or name (#9751)
This commit is contained in:
parent
28f425a9f9
commit
2e4dd69fa1
|
|
@ -4753,7 +4753,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
|||
|
||||
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
|
||||
sb.and("name", sb.entity().getName(), SearchCriteria.Op.EQ);
|
||||
sb.and("name", sb.entity().getName(), SearchCriteria.Op.EQ);
|
||||
sb.and("keyword", sb.entity().getName(), SearchCriteria.Op.LIKE);
|
||||
final SearchCriteria<UserDataVO> sc = sb.create();
|
||||
_accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
|
||||
|
||||
|
|
@ -4766,7 +4766,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
|||
}
|
||||
|
||||
if (keyword != null) {
|
||||
sc.setParameters("name", "%" + keyword + "%");
|
||||
sc.setParameters("keyword", "%" + keyword + "%");
|
||||
}
|
||||
|
||||
final Pair<List<UserDataVO>, Integer> result = userDataDao.searchAndCount(sc, searchFilter);
|
||||
|
|
|
|||
Loading…
Reference in New Issue