1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sec.businessobject.lookup;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.kuali.ole.coa.identity.OrgReviewRoleLookupableHelperServiceImpl;
22 import org.kuali.ole.sec.SecKeyConstants;
23 import org.kuali.ole.sec.service.AccessSecurityService;
24 import org.kuali.rice.krad.util.GlobalVariables;
25
26
27
28
29 public class AccountSecurityOrgReviewRoleLookupableHelperServiceImpl extends OrgReviewRoleLookupableHelperServiceImpl {
30 protected AccessSecurityService accessSecurityService;
31
32
33
34
35
36
37 @Override
38 public List getSearchResults(Map<String, String> fieldValues) {
39 List results = super.getSearchResults(fieldValues);
40
41 int resultSizeBeforeRestrictions = results.size();
42 accessSecurityService.applySecurityRestrictionsForLookup(results, GlobalVariables.getUserSession().getPerson());
43
44 accessSecurityService.compareListSizeAndAddMessageIfChanged(resultSizeBeforeRestrictions, results, SecKeyConstants.MESSAGE_LOOKUP_RESULTS_RESTRICTED);
45
46 return results;
47 }
48
49
50
51
52
53
54 @Override
55 public List getSearchResultsUnbounded(Map<String, String> fieldValues) {
56 List results = super.getSearchResultsUnbounded(fieldValues);
57
58 int resultSizeBeforeRestrictions = results.size();
59 accessSecurityService.applySecurityRestrictionsForLookup(results, GlobalVariables.getUserSession().getPerson());
60
61 accessSecurityService.compareListSizeAndAddMessageIfChanged(resultSizeBeforeRestrictions, results, SecKeyConstants.MESSAGE_LOOKUP_RESULTS_RESTRICTED);
62
63 return results;
64 }
65
66
67
68
69
70
71 public void setAccessSecurityService(AccessSecurityService accessSecurityService) {
72 this.accessSecurityService = accessSecurityService;
73 }
74 }