@@ -198,7 +198,7 @@ public Pair<List<QuotaSummaryResponse>, Integer> createQuotaSummaryResponse(Quot
198198 Account caller = CallContext .current ().getCallingAccount ();
199199
200200 if (!accountTypesThatCanListAllQuotaSummaries .contains (caller .getType ()) || !cmd .isListAll ()) {
201- return getQuotaSummaryResponse (cmd .getEntityOwnerId (), null , null , null , cmd );
201+ return getQuotaSummaryResponse (cmd .getEntityOwnerId (), null , null , cmd );
202202 }
203203
204204 return getQuotaSummaryResponseWithListAll (cmd , caller );
@@ -221,12 +221,7 @@ protected Pair<List<QuotaSummaryResponse>, Integer> getQuotaSummaryResponseWithL
221221 accountId = cmd .isListAll () ? null : caller .getAccountId ();
222222 }
223223
224- String keyword = null ;
225- if (Account .Type .ADMIN .equals (caller .getType ())) {
226- keyword = cmd .getKeyword ();
227- }
228-
229- return getQuotaSummaryResponse (accountId , keyword , domainId , domainPath , cmd );
224+ return getQuotaSummaryResponse (accountId , domainId , domainPath , cmd );
230225 }
231226
232227 /**
@@ -250,13 +245,13 @@ protected String getDomainPathByDomainIdForDomainAdmin(Account caller) {
250245 return domain .getPath ();
251246 }
252247
253- protected Pair <List <QuotaSummaryResponse >, Integer > getQuotaSummaryResponse (Long accountId , String accountName , Long domainId , String domainPath , QuotaSummaryCmd cmd ) {
248+ protected Pair <List <QuotaSummaryResponse >, Integer > getQuotaSummaryResponse (Long accountId , Long domainId , String domainPath , QuotaSummaryCmd cmd ) {
254249 if (accountId != null && accountId == -1 ) {
255250 // Either no specific account as provided, or list all is disabled
256251 accountId = CallContext .current ().getCallingAccountId ();
257252 }
258253
259- Pair <List <QuotaSummaryVO >, Integer > pairSummaries = quotaSummaryDao .listQuotaSummariesForAccountAndOrDomain (accountId , accountName , domainId , domainPath ,
254+ Pair <List <QuotaSummaryVO >, Integer > pairSummaries = quotaSummaryDao .listQuotaSummariesForAccountAndOrDomain (accountId , cmd . getKeyword () , domainId , domainPath ,
260255 cmd .getAccountStateToShow (), cmd .getStartIndex (), cmd .getPageSizeVal ());
261256 List <QuotaSummaryVO > summaries = pairSummaries .first ();
262257
0 commit comments