Em Wed, 03 Jun 2009 22:07:28 -0300, Onno Scheffers <o...@piraya.nl>
escreveu:
I'm also using a custom dispatcher.
The thing I don't like about most of the current examples/solutions I've
seen so far is that access is allowed by default if the developer
forgets to
add a specific annotation. I'd like the page to be protected unless the
developers makes it publicly accessible.
Nice reasoning. :)
Therefore I setup our dispatcher to always check if the requested page
implements either a PublicPage interface or a ProtectedPage interface. If
none of these interfaces is implemented access is denied.
Why don't you use annotations for that? Something like @PublicPage? If the
page hasn't it, it is protected.
Unless there are pages that need some internal logic to decide if they're
public or protected (hence an interface with a isPublic() method),
annotations are a better solution for the problem.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org