[Zope] Getting a specific user role
Jason Spisak
444@hiretechs.com
Fri, 09 Jun 2000 16:16:59 GMT
Mabe, Brad writes:
> That did the trick. Someday I'm going to get the hang of this stuff.
>
I have the hang of some stuff but get hung by the rest ;)
> Thanks, Jason.
>
> -=Brad=-
>
> -----Original Message-----
> From: Jason Spisak
> To: Mabe, Brad
> Cc: 'zope@zope.org'
> Sent: 6/8/00 7:48 PM
> Subject: Re: [Zope] Getting a specific user role
>
> Mabe, Brad writes:
>
> > Forgive me if this has been covered before.
>
> There's no real great documentation on using the security API, and it's
> changing a bit anyway.
>
> >
> > I am implementing a login/security scheme through the use of GUF and
> SQL
> > methods. My user and role information is kept in a SQL database and a
> user
> > can have more than one role assigned to him/her.
> >
> > What I would like to do is check if a specific role has been assigned
> to the
> > current user, and then display some additional menu items if that role
> has
> > been assigned. I haven't been able to figure out how to get and check
> the
> > roles that have been assigned to the current user.
> >
> > As usual, any help will be greatly appreciated.
> >
> > -=Brad=-
>
> try:
>
> <dtml-if "AUTHENTICATED_USER.has_role('MyRole')">
> My stuff
> </dtml-if>
>
> Jason Spisak
> CIO
> HireTechs.com
> 6151 West Century Boulevard
> Suite 900
> Los Angeles, CA 90045
> P. 310.665.3444
> F. 310.665.3544
>
> Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
> address may not be added to any commercial mail list with out my
> permission. Violation of my privacy with advertising or SPAM will
> result in a suit for a MINIMUM of $500 damages/incident, $1500 for
> repeats.
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.