struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Hertz" <jhe...@speakeasy.net>
Subject RE: Where does Tiles check for roles for role based access
Date Sun, 10 Oct 2004 18:35:45 GMT
What I do in my "menu" tile would be something like this:

<logic:present role="module-admin,admin">
<html:link blah blah blah>Administration</html:link>
</logic:present>

And the tile-defs for the screens that have the admin functions change what
jsp gets used for the menu tile. Mixing and matching the jsps that get used
in the layout, while layout is consistent, but the menu changes. This is
basically what tiles were meant to be used for. Youre actually trying to
make the layout sensitive to the role of the user...

If you really want to replace the whole tile, you could "logic:present"
around the <tiles:insert> tags. I wouldn't, but that's me.

HTH,

-Joe


-----Original Message-----
From: pradeeprao [mailto:f2001246@gmail.com]
Sent: Sunday, October 10, 2004 9:46 AM
To: user@struts.apache.org
Subject: Where does Tiles check for roles for role based access


Hai everyone!

In my web app, i need to use Struts Tiles for role based access and
deploy in JBoss as i also use EJBs for business tier.

In my app., i have admin, user and module-admin. as roles.
Based on the person logged in, i need to show him the extra links
in the menu.

If i have admin logged in and in tiles definition i use for an
attribute role="admin",
How come tiles know that admin has logged in, where does it check for
those roles?

Plz help me.
I'm new to Struts and Tiles.
ThankU
--
Pradeep Rao
Work Hard, Party Harder.
----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message