Davide,

The auth framework stores the output from the authentication resource in the
session context. I think you can use the simple selector along with the
session context input module to get at the role. Something like:

<map:select type="simple">
  <map:parameter name="value"
value="{session-context:authentication/role}"/>
  <map:when test="admin">
    ...
  </map:when>
  <map:otherwise>
    ...
  </map:otherwise>
</map:select>

Morley

> -----Original Message-----
> From: Davide [mailto:[EMAIL PROTECTED]
> Sent: Monday January 26, 2004 4:10 AM
> To: [EMAIL PROTECTED]
> Subject: Authentication FW. Controlling the flow depending on the role
>
>
> Hi all! i have the following handler:
>
>
> <handler name="navigation">
>       <redirect-to uri="cocoon:/login"/>
>       <authentication uri="cocoon:/authenticate"/>
> </handler>
>
> When i authenticate a user i get <ID>UserID</ID> and <role>User
> role</role>
>
> I would like to have an admin area where only users with "admin role" can
> enter;
> My admin area pipelin is this, and in comment is what i would like to do:
>
> <map:match pattern="admin">
>       <map:act type="auth-protect">
>               <map:parameter name="handler" value="navigation"/>
>               <!-- If user role ='admin' do this -->
>                       <map:parameter
> name="use-request-parameters" value="true"/>
>                       <map:generate type="jsp" src="jsp/admin_main.jsp"/>
>                       <map:transform src="style/admin_main_html.xsl"/>
>                       <map:serialize/>
>               <!--else -->
>                       <!TODO: error message -->
>               <!-- end if -->
>       </map:act>
> </map:match>
>
> i tried some selectors but without success; how to do it??
>
> best regards, Davide
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to