Ignore:
Timestamp:
09/03/13 08:45:38 (11 years ago)
Author:
andmor
Message:

Decoupled 'authorized roles' from isAuthorized.dpml.
'Forbidden' response generalized to a generic endpoint.
Some more compreensive debug info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cats/SCHEMAcat/trunk/urn.org.isocat.schemacat.interface.rest/interface/schemas.dpml

    r3495 r3504  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <sequence debug="true">
     2<sequence debug="false">
    33        <sloot-debug>
    44                <log>
    55                        <level>INFO</level>
    66                        <message>
    7                                 <literal type="string">[interface.REST] Requested list of schemas by id: %1</literal>
     7                                <literal type="string">[interface.REST] [%1] requested list of schemas.</literal>
    88                        </message>
    99                        <param>
     
    2727                                        </literal>
    2828                                </argument>
     29                                <argument name="authorizedRoles">
     30                                        <request>
     31                                                <identifier>active:org.isocat.schemacat.access.data.schemas.authorizedRoles</identifier>
     32                                        </request>
     33                                </argument>
    2934                        </request>
    3035                </cond>
     
    3338                                <identifier>active:org.isocat.schemacat.access.data.schemas</identifier>
    3439                                <argument name="userID">
    35                                         <literal type="string"></literal>
     40                                        <literal type="string">*</literal>
    3641                                </argument>
    3742                        </request>
     
    3944                <else>
    4045                        <request assignment="response">
    41                                 <identifier>active:groovy</identifier>
    42                                 <argument name="operator">
    43                                         <!-- TODO: check if this is the proper way to generata a forbidden response -->
    44                                         <literal type="string">
    45                                                 context.createResponseFrom("Forbidden!");
    46                                                 context.sink("httpResponse:/code", 403);
    47                                         </literal>
    48                                 </argument>
     46                                <identifier>active:interface.rest.HTTPresponse.forbidden</identifier>
    4947                        </request>
    5048                </else>
     
    5351                <request>
    5452                        <verb>SINK</verb>
    55                         <identifier>res:/debug/org.isocat.schemacat.interface.rest.user.schemas.response.xml</identifier>
     53                        <identifier>res:/debug/org.isocat.schemacat.interface.rest.schemas.response.xml</identifier>
    5654                        <argument name="primary">this:response</argument>
    5755                </request>
Note: See TracChangeset for help on using the changeset viewer.