You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mark Lybarger <Ma...@CBC-Companies.com> on 2004/01/14 16:57:39 UTC
RE: turbine security - viewing access in template
> -----Original Message-----
> From: Mark Lybarger
> Sent: Wednesday, January 14, 2004 8:53 AM
> To: 'turbine-user@jakarta.apache.org'
> Subject: turbine security - viewing access in template
>
> i looked over the turbine security guide at:
> http://jakarta.apache.org/turbine/turbine-2.3/howto/security-h
owto.html
>
> basicaly, i'm after a method which i can check a users
> security (see if user's group has a particular role) from
> within a velocity template. i have combo box that i need to
> display if the user is of a c ertain security, otherwise, i
> need to disable the combo box and have the default option be
> the selected option. ie, certain users can override shipping
> costs when submitting an order or something like that.
>
> thanks!
>
> ~mark
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: turbine security - viewing access in template
Posted by Jeff Painter <pa...@kiasoft.com>.
in your velocity template you can do the following
<select>
#if ( $data.getACL().hasRole("sales") || $data.getACL().hasRole("shipping") )
<option value="0">shipping</option>
#end
#if ( $data.getACL().hasRole("admin") )
<option value="1">admin</option>
#end
</select>
On Wed, 14 Jan 2004, Mark Lybarger wrote:
>
>
> > -----Original Message-----
> > From: Mark Lybarger
> > basicaly, i'm after a method which i can check a users
> > security (see if user's group has a particular role) from
> > within a velocity template. i have combo box that i need to
> > display if the user is of a c ertain security, otherwise, i
> > need to disable the combo box and have the default option be
> > the selected option. ie, certain users can override shipping
> > costs when submitting an order or something like that.
> >
> > thanks!
> >
> > ~mark
> >
Regards,
Jeffery Painter
- --
painter@kiasoft.com http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1 4E62 E4CB E4DA 5913 EFBC
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org