Github user ustcweizhou commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1910#discussion_r98412264
  
    --- Diff: server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java 
---
    @@ -596,7 +597,7 @@ public void 
doInTransactionWithoutResult(TransactionStatus status) {
     
     
             sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
    -        sb.and("username", sb.entity().getUsername(), 
SearchCriteria.Op.EQ);
    +        sb.and("username", sb.entity().getUsername(), 
SearchCriteria.Op.LIKE);
    --- End diff --
    
    I vote EQ instead LIKE here.
    you may add new rules here in the next part, for example.
    
    +        if (keyword != null) {
    +            final SearchCriteria<VpnUserVO> ssc = 
_vpnUsersDao.createSearchCriteria();
    +            ssc.addOr("username", SearchCriteria.Op.LIKE, "%" + keyword + 
"%");
    +            ssc.addOr("state", SearchCriteria.Op.EQ, "%" + keyword + "%");
    +            sc.addAnd("username", SearchCriteria.Op.SC, ssc);
    +        }
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to