getRolesInContext

classic Classic list List threaded Threaded
3 messages Options
Raul Buira Raul Buira
Reply | Threaded
Open this post in threaded view
|

getRolesInContext


Hello!

How can I get the Roles of a user from an Guard expression of a transition's Workflow?
I supose it's using getUser and getRolesInContext, but I don't find the correct expression.

I need it to avoid a transition for a specific Role.

Thanks
RedTurtle RedTurtle
Reply | Threaded
Open this post in threaded view
|

Re: getRolesInContext

getRolesInContext is the way.

Can you report an example of the uncorrect expression?

On 10/19/05, Raul Buira <[hidden email]> wrote:

>
> Hello!
>
> How can I get the Roles of a user from an Guard expression of a transition's
> Workflow?
> I supose it's using getUser and getRolesInContext, but I don't find the
> correct expression.
>
> I need it to avoid a transition for a specific Role.
>
> Thanks


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
RedTurtle RedTurtle
Reply | Threaded
Open this post in threaded view
|

Re: getRolesInContext

In reply to this post by Raul Buira
Something like:

python: 'YourRoleName' not in
here.portal_membership.getAuthenticatedMember().getRolesInContext(here)

On 10/20/05, Raul Buira <[hidden email]> wrote:

>
> Hi!
> What I don't know is how to use getRolesInContext with getUser. I don't know
> the syntaxis to put in the Guard expression. Can you help me?
> Thanks.
>
>
> getRolesInContext is the way.
>
>  Can you report an example of the uncorrect expression?
>
>  On 10/19/05, Raul Buira <[hidden email]> wrote:
>  >
>  > Hello!
>  >
>  > How can I get the Roles of a user from an Guard expression of a
> transition's
>  > Workflow?
>  > I supose it's using getUser and getRolesInContext, but I don't find the
>  > correct expression.
>  >
>  > I need it to avoid a transition for a specific Role.
>  >
>  > Thanks


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users