Thanks for the response Rob, Actually, if I change the order or add the role to the default decorator, no decorator is applied at all.
There might be a <c:if isUserInRole style approach to this but I want to see if I can get this to work. Thanks Ram R Rob Hills wrote: > > Hi, > > rdr wrote: >> I am trying to apply different decorators based on user role when he/she >> log's in. I am trying to use the solution mentioned in >> http://jira.opensymphony.com/browse/SIM-37 >> >> I have these decorators defined. >> >> <decorator name="super" page="super.jsp" role="ROLE_SUPER"> >> <pattern>/*</pattern> >> </decorator> >> <decorator name="user" page="user.jsp"> >> <pattern>/*</pattern> >> </decorator> >> >> But "user" decorator gets applied even if I login with a user in role >> "ROLE_SUPER" >> >> Unfortunately sitemesh does not have log statements to debug. Please let >> me >> know if I missed anything. >> > > This is purely a guess as I probably know less about sitemesh than you > do, but could it be that because your "user" decorator appears after > your "super" decorator, and it has no role constraint, it's overriding > your "super" constraint. > > I'd try either adding a "ROLE_USER" to your user decorator, or if you > want it to be the default for all user roles other than ROLE_SUPER, > maybe try reversing the order of decorator tags. I'll be very > interested to hear how you make out. > > Cheers, > > Rob Hills > Waikiki, Western Australia > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Sitemesh-decorator-based-on-ROLE-tf4864780s2369.html#a13922330 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
