cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject Re: Registering own Authentication Manager
Date Wed, 27 Oct 2004 05:12:33 GMT
You don't need a new selector.  Return the user's role in the XML from 
your authentication pipeline like this:

    <ID>Unique ID of the user in the system</ID>
    <role>rolename</role> <!-- optional -->
        Any additional optional information can be supplied here. 
        This will be stored in the session for later retrieval


Then use the ParameterSelector like this:

      <map:select type="parameter">
        <map:parameter name="parameter-selector-test" value="{session-context:/authentication/role}"/>
        <map:when test="Administrator">
        <map:when test="ReqularUser">



This works if the user only has a single role.

Frangos, Nick (SAPOL) wrote:

>An Authentication Manager which handles roles would be the better way to do
>this, as you would not have to write any flow script. All that would be
>required is to pass in the role to the Authentication Manager, to gain
>access in a specific area of the sitemap. Is there any plans by Carsten and
>co. to implement something like this. I could write something myself, but as
>a general rule I try not to extend the cocoon framework but use it as is.
>An alternative approach which I kind of like is to write a user roles
>Selector, and use that to control role based access. This was suggested in
>an earlier reply and I think it would work nicely because once the selector
>is written, the rest of the logic is contained within the sitemap itself.
>Nick Frangos

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message