On 8/24/07, Charles Mason <[EMAIL PROTECTED]> wrote: > @Secured("ROLE_ADMIN") > public class AdminPage > { > } > > I was wondering how this worked. I am assuming its through some sort > of T5 service. I was looking at the documentation on the T5 site, > although I can't figure how to do something like that. I also had a > look at the Tapestry 5 acegi library. But not knowing acegi, its hard > to see how this works in the source. > > I was wondering if someone could tell me the basic principle of what I > need to write or implement to be able to hook in the to the page > loading procedure from just an annotation.
The tapestry5-acegi library adds a few request filters that run between your browser and the T5 engine. It also adds a few hooks to your classes defined by the @Secured annotation. These hooks are executed before your class by a few Acegi classes which checks right permissions/roles, etc and either gives you access to the page or redirects you to the defined login page. Depending on your needs, Acegi might be the bigger hammer to punch the little nail :-). To ask your second question, the code tapestry5-acegi uses to wrap around the class is found here in this service: <http://www.localhost.nu/svn/public/tapestry5-acegi/trunk/src/main/java/nu/localhost/tapestry/acegi/services/internal/AcegiWorker.java> -- regards, Robin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]