You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2003/06/26 16:30:07 UTC

Authorization error messages

Hi Lenya developers,

I think it would be nice to support the user by access
control error messages, especially when we redirect him to the
login screen.

I see two simple solutions:

1) The authorizer action returns a message:

<map:match pattern="**">
   <map:act type="authorizer">
     <map:select type="parameter">
       <map:parameter name="parameter-selector-test"
                      value="{authorizer.message}">

       <map:when test="success">
         ...
       </map:when>

       <map:otherwise>
         <map:redirect-to
           uri="login-screen?message={authorizer.message}"/>
       </map:otherwise>

     </map:select>
   </map:act>
</map:match>

[+] you see what happens and which parameters are passed
[-] parameters have to be passed as strings
[-] a naming contract is needed between authorizer, xsp
     and sitemap

2) The message is stored in the session.

[-] another session attribute ...


What do you think?

Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org