turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Painter <pain...@kiasoft.com>
Subject RE: turbine security - viewing access in template
Date Wed, 14 Jan 2004 16:03:05 GMT

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


Mime
View raw message