Antonio,

Thanks for all your help on this.

I've managed to fix it, using a rather inelegant approach of including the 
roles logic further up the dependency chain for the definitions, rather than 
further down.

I understand your point about moving to Tiles 2.x, but we're using mandated 
codebases here, and the standards people take a little while to certify 
releases for use!



                                 Regards,

                                         Jim

Jim Gallagher,
Core Web Security,
Group Technology Solutions,
Royal Bank of Scotland,
Parkgate Business Park,
Parkgate Street,
Dublin 8.
RBS Depot Code: DUB

ITS:                    7-4171-7167
External:               +353-1-648 7167 
Internet mail:  [email protected]
P Please don't print this e-mail unless you really need to.




-----Original Message-----
From: Antonio Petrelli [mailto:[email protected]] 
Sent: 09 March 2010 12:48
To: [email protected]
Subject: Re: Issue with retrieving Tiles definitions in code

2010/3/9 Gallagher, Jim (UK Europe Middle East & Group Functions, Technology 
Services) <[email protected]>:
> This behaviour was available in Struts-Tiles, has it been removed from Tiles 
> 2.0?

I think it was an unintended feature :-D

> The rules definition is, as you say, not designed to be rendered. It's 
> purpose is to hold a list of security roles  - these roles are processed 
> programmatically and this decides whether the user sees that menu item (or 
> entire menu), based on their assigned role.

Tiles has a very basic role-based security: most of JSP tags (insertTemplate, 
insertAttribute, insertDefinition) have a "role"
attribute, where you can put comma-separated list of enabled roles (the user 
must be under at least one role).
These roles can be defined in XML files too.
If you need something more complicated, I think that your entry point might be 
the DefinitionsFactory:
http://tiles.apache.org/2.0/framework/tutorial/extension/points.html
However I think that you should move your rules outside of Tiles and load them 
separately.

If you have more questions on how to implement a DefinitionsFactory, feel free 
to ask here.

Antonio

P.S. I strongly suggest to migrate to, at least, Tiles 2.1.x: there are new 
features (like wildcards, EL expressions) that can help development a lot. 
Moreover, the API is cleaner.
*** WARNING : This message originates from the Internet ***

The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The Royal Bank of 
Scotland plc does not accept responsibility for changes made to this message 
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, 
it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use of this message and any attachments will not 
adversely affect its systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry out 
such virus and other checks as it considers appropriate.

  • ... Gallagher, Jim (UK Europe Middle East & Group Functions, Technology Services)
    • ... Antonio Petrelli
      • ... Gallagher, Jim (UK Europe Middle East & Group Functions, Technology Services)
        • ... Antonio Petrelli
          • ... Gallagher, Jim (UK Europe Middle East & Group Functions, Technology Services)
            • ... Antonio Petrelli
              • ... Gallagher, Jim (UK Europe Middle East & Group Functions, Technology Services)
                • ... Antonio Petrelli

Reply via email to