1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.sec.service.impl;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.ole.coa.service.OrganizationService;
20 import org.kuali.ole.sys.OLEPropertyConstants;
21 import org.kuali.ole.sys.context.SpringContext;
22
23
24
25
26 public class DescendOrganizationAccessPermissionEvaluatorImpl extends AccessPermissionEvaluatorImpl {
27
28
29
30
31
32
33 @Override
34 protected boolean isMatch(String matchValue, String value) {
35 boolean match = false;
36
37 if (StringUtils.equalsIgnoreCase(value, matchValue)) {
38 match = true;
39 }
40 else {
41 String chartCode = (String) otherKeyFieldValues.get(OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE);
42 match = SpringContext.getBean(OrganizationService.class).isParentOrganization(chartCode, value, chartCode, matchValue);
43 }
44
45 return match;
46 }
47
48 }