cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: User Roles and Flowscript
Date Thu, 30 Mar 2006 06:18:20 GMT
As always, the archives are worth searching as well ;-) e.g.

(I had a similar problem)

>>> 2006/03/29 10:47 PM >>>
Stewart, Gary wrote:
> Hi there,
> I've been working with the authentication resource for a while but I figured it was about
time I implemented per role pipelines (that is some pipelines can only be accessed by some
roles). I am using flowscript to do this but I don't seem to be able to get it to work. The
pipeline performs an authentication check (I figure this would give me the session information;
or is there something I need to do in the flow?). In the Javascript I quite simply have:
> function administratorOnlyPage()
> {
>  var resource = cocoon.parameters.resourceRequest;
>  if(cocoon.request.isUserInRole("Administrator"))
>  {
>   cocoon.sendPage(resource);
>  }
>  else
>  {
>   cocoon.sendPage("access-denied");
>  }
> }
> I've checked the user role on another page and it appears that they are an administrator.
Is there something I'm missing? Do I need to define the roles?
> Sorry to bother and thanks,
> Gary
> *****************************************************************
> The information contained in this message may be confidential or 
> legally privileged and is intended for the addressee only. If you 
> have received this message in error or there are any problems 
> please notify the originator immediately. The unauthorised use, 
> disclosure, copying or alteration of this message is 
> strictly forbidden.
> *****************************************************************
> If you work for NHS Lothian and wish to have help to stop smoking, support is available
by contacting or 0131 537 9494  - internal 49494.  For
anyone else living/working in Lothian, please contact 0800 848484 for your nearest NHS stop
smoking service.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> For additional commands, e-mail: 

Hi Gary,

this might help you: 

It didn't help me. I have the same problem like in 

However, you can use something like this:

<map:parameter name="userid"		 
value="{session-context:authentication/authentication/ID}" />

when you call your javaflow function, and

var uid = cocoon.parameters["userid"];

in your javaflow.


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

This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice 
CSIR Copyright, Terms and Conditions 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.

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

View raw message