source: cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/user.dpml @ 3492

Last change on this file since 3492 was 3492, checked in by andmor, 11 years ago

Explicit verb declaration when calling org.isocat.schemacat.access.data.user
Debug flag set to false.

File size: 1.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<sequence debug="false">
3        <sloot-debug>
4                <log>
5                        <level>INFO</level>
6                        <message>
7                                <literal type="string">[interface.REST] Requested user for id: %1</literal>
8                        </message>
9                        <param>arg:userID</param>
10                </log>
11        </sloot-debug>
12        <if>
13                <cond>
14                        <request>
15                                <identifier>active:isAuthorized</identifier>
16                                <argument name="authorizedIDs">
17                                        <request>
18                                                <identifier>active:sloot.xquery</identifier>
19                                                <argument name="operator">
20                                                        <literal type="xml">
21                                                                <ids>
22                                                                        <id>{$userID}</id>
23                                                                </ids>
24                                                        </literal>
25                                                </argument>
26                                                <argument name="userID">arg:userID</argument>
27                                        </request>
28                                </argument>
29                        </request>
30                </cond>
31                <then>
32                        <request assignment="response">
33                                <identifier>active:org.isocat.schemacat.access.data.user</identifier>
34                                <verb>SOURCE</verb>
35                                <argument name="id">arg:userID</argument>
36                        </request>
37                </then>
38                <else>
39                        <request assignment="response">
40                                <identifier>active:groovy</identifier>
41                                <argument name="operator">
42                                        <!-- TODO: check if this is the proper way to generata a forbidden response -->
43                                        <literal type="string">
44                                                context.createResponseFrom("Forbidden!");
45                                                context.sink("httpResponse:/code", 403);
46                                        </literal>
47                                </argument>
48                        </request>
49                </else>
50        </if>
51        <sloot-debug>
52                <request>
53                        <verb>SINK</verb>
54                        <identifier>res:/debug/org.isocat.schemacat.interface.rest.user.response.xml</identifier>
55                        <argument name="primary">this:response</argument>
56                </request>
57        </sloot-debug>
58</sequence>
Note: See TracBrowser for help on using the repository browser.