Davide,

I may not have had the correct select parameter below. Try
{session-context:authentication/authentication/role}.

If that doesn't work, check the data being stored in the session context.
You can do this e.g. by temporarily placing the following inside your
auth-protect action:

<map:generate type="file" src="auth-context.xml"/>
<map:transform type="session"/>
<map:serialize type="xml"/>

where auth-context.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<auth-context xmlns:session="http://apache.org/cocoon/session/1.0";>
  <session:getxml context="authentication" path="/authentication"/>
</auth-context>

You should see the roles appearing in the auth-context XML, along with any
other data associated with the logged in user.

Also beware that browser caching can sometimes trip you up. Make sure that
the results you're seeing are actually coming from the server, not the
browser's cache.

Morley

> -----Original Message-----
> From: Davide [mailto:[EMAIL PROTECTED]
> Sent: Monday January 26, 2004 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Authentication FW. Controlling the flow depending on the
> role
>
>
> At 07:29 PM 26-01-04, you wrote:
> >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
>
> it doesn't work..
>
>
> ---------------------------------------------------------------------
> 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