@@ -695,7 +695,7 @@ public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursiv
695695 String keyword = null ;
696696
697697 Pair <List <UserAccountJoinVO >, Integer > result = getUserListInternal (caller , permittedAccounts , listAll , id ,
698- username , type , accountName , state , keyword , null , domainId , recursive , null );
698+ username , type , accountName , state , keyword , null , domainId , recursive , null , null );
699699 ListResponse <UserResponse > response = new ListResponse <UserResponse >();
700700 List <UserResponse > userResponses = ViewResponseHelper .createUserResponse (ResponseView .Restricted , CallContext .current ().getCallingAccount ().getDomainId (),
701701 result .first ().toArray (new UserAccountJoinVO [result .first ().size ()]));
@@ -723,6 +723,7 @@ private Pair<List<UserAccountJoinVO>, Integer> searchForUsersInternal(ListUsersC
723723 Object state = cmd .getState ();
724724 String keyword = cmd .getKeyword ();
725725 String apiKeyAccess = cmd .getApiKeyAccess ();
726+ User .Source userSource = cmd .getUserSource ();
726727
727728 Long domainId = cmd .getDomainId ();
728729 boolean recursive = cmd .isRecursive ();
@@ -731,11 +732,11 @@ private Pair<List<UserAccountJoinVO>, Integer> searchForUsersInternal(ListUsersC
731732
732733 Filter searchFilter = new Filter (UserAccountJoinVO .class , "id" , true , startIndex , pageSizeVal );
733734
734- return getUserListInternal (caller , permittedAccounts , listAll , id , username , type , accountName , state , keyword , apiKeyAccess , domainId , recursive , searchFilter );
735+ return getUserListInternal (caller , permittedAccounts , listAll , id , username , type , accountName , state , keyword , apiKeyAccess , domainId , recursive , searchFilter , userSource );
735736 }
736737
737738 private Pair <List <UserAccountJoinVO >, Integer > getUserListInternal (Account caller , List <Long > permittedAccounts , boolean listAll , Long id , Object username , Object type ,
738- String accountName , Object state , String keyword , String apiKeyAccess , Long domainId , boolean recursive , Filter searchFilter ) {
739+ String accountName , Object state , String keyword , String apiKeyAccess , Long domainId , boolean recursive , Filter searchFilter , User . Source userSource ) {
739740 Ternary <Long , Boolean , ListProjectResourcesCriteria > domainIdRecursiveListProject = new Ternary <Long , Boolean , ListProjectResourcesCriteria >(domainId , recursive , null );
740741 accountMgr .buildACLSearchParameters (caller , id , accountName , null , permittedAccounts , domainIdRecursiveListProject , listAll , false );
741742 domainId = domainIdRecursiveListProject .first ();
@@ -761,6 +762,7 @@ private Pair<List<UserAccountJoinVO>, Integer> getUserListInternal(Account calle
761762 sb .and ("domainId" , sb .entity ().getDomainId (), Op .EQ );
762763 sb .and ("accountName" , sb .entity ().getAccountName (), Op .EQ );
763764 sb .and ("state" , sb .entity ().getState (), Op .EQ );
765+ sb .and ("userSource" , sb .entity ().getSource (), Op .EQ );
764766 if (apiKeyAccess != null ) {
765767 sb .and ("apiKeyAccess" , sb .entity ().getApiKeyAccess (), Op .EQ );
766768 }
@@ -827,6 +829,10 @@ private Pair<List<UserAccountJoinVO>, Integer> getUserListInternal(Account calle
827829 }
828830 }
829831
832+ if (userSource != null ) {
833+ sc .setParameters ("userSource" , userSource .toString ());
834+ }
835+
830836 return _userAccountJoinDao .searchAndCount (sc , searchFilter );
831837 }
832838
0 commit comments