urn_policy_cs4_anonymizeTaskOfOthers_neu.xml 1.83 KB
Newer Older
Raj Shah's avatar
Raj Shah committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<policy id="urn:policy:cs4:anonymizeTasksOfOthers" name="at IESE" description="Foremen can only see their own tasks in full detail. " xmlns="http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage"
	xmlns:tns="http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage" xmlns:parameter="http://www.iese.fraunhofer.de/ind2uce/3.2.46/parameter" xmlns:pip="http://www.iese.fraunhofer.de/ind2uce/3.2.46/pip"
	xmlns:function="http://www.iese.fraunhofer.de/ind2uce/3.2.46/function" xmlns:event="http://www.iese.fraunhofer.de/ind2uce/3.2.46/event" xmlns:constant="http://www.iese.fraunhofer.de/ind2uce/3.2.46/constant"
	xmlns:variable="http://www.iese.fraunhofer.de/ind2uce/3.2.46/variable" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<mechanism event="urn:action:cs4:show-task">
		<if>
					<pip:boolean method="urn:info:cs4:getRoleByUsername" default="true">
						<parameter:string name="userId">
							<event:string eventParameter="user" jsonPathQuery="$.userId" default="" />
						</parameter:string>
					</pip:boolean>
<!-- 			<and> -->
<!-- 				<equals> -->
<!-- 					<constant:string value="ROLE_USER" /> -->
<!-- 				</equals> -->
<!-- 				<not> -->
<!-- 					<equals> -->
<!-- 						<event:string eventParameter="user" jsonPathQuery="$.userId" default="" /> -->
<!-- 						<event:string eventParameter="task" jsonPathQuery="$.foreman.userId" default="" /> -->
<!-- 					</equals> -->
<!-- 				</not> -->
<!-- 			</and> -->
			<then>
				<modify eventParameter="task" method="anagram" jsonPathQuery="$.expression">
					<parameter:number name="percentage" value="100" />
				</modify>

				<modify eventParameter="task" method="replace" jsonPathQuery="$.name">
					<parameter:object name="replaceWith" value="XXXX" />
				</modify>

				<modify eventParameter="task" method="delete" jsonPathQuery="$.budget" />
			</then>
		</if>
	</mechanism>
</policy>