1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kns.service.impl; |
17 | |
|
18 | |
import java.util.ArrayList; |
19 | |
import java.util.List; |
20 | |
|
21 | |
import org.kuali.rice.core.util.AttributeSet; |
22 | |
import org.kuali.rice.kim.bo.role.dto.KimPermissionInfo; |
23 | |
import org.kuali.rice.kim.util.KimConstants; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | 0 | public class DocumentTypeAndRelationshipToNoteAuthorPermissionTypeService |
29 | |
extends DocumentTypePermissionTypeServiceImpl { |
30 | |
|
31 | |
@Override |
32 | |
protected List<KimPermissionInfo> performPermissionMatches( |
33 | |
AttributeSet requestedDetails, |
34 | |
List<KimPermissionInfo> permissionsList) { |
35 | |
|
36 | 0 | List<KimPermissionInfo> matchingPermissions = new ArrayList<KimPermissionInfo>(); |
37 | 0 | if (requestedDetails == null) { |
38 | 0 | return matchingPermissions; |
39 | |
} |
40 | |
|
41 | |
|
42 | 0 | for (KimPermissionInfo kimPermissionInfo : permissionsList) { |
43 | 0 | if (Boolean.parseBoolean(requestedDetails |
44 | |
.get(KimConstants.AttributeConstants.CREATED_BY_SELF))) { |
45 | 0 | if(Boolean.parseBoolean(kimPermissionInfo.getDetails().get( |
46 | |
KimConstants.AttributeConstants.CREATED_BY_SELF_ONLY))){ |
47 | 0 | matchingPermissions.add(kimPermissionInfo); |
48 | |
} |
49 | |
|
50 | |
}else{ |
51 | 0 | if (!Boolean.parseBoolean(kimPermissionInfo.getDetails().get( |
52 | |
KimConstants.AttributeConstants.CREATED_BY_SELF_ONLY))) { |
53 | 0 | matchingPermissions.add(kimPermissionInfo); |
54 | |
} |
55 | |
} |
56 | |
|
57 | |
} |
58 | |
|
59 | 0 | matchingPermissions = super.performPermissionMatches(requestedDetails, matchingPermissions); |
60 | 0 | return matchingPermissions; |
61 | |
} |
62 | |
} |