I found that the way to do what I want now is by not subclassing
SecureResource (which eliminates the need for a require attribute) in
my root controler and changing the following line in start-
myproject.py:
start_server(Root())
to:
start_server(SecureObject(Root(), identity.not_anonymous(),
['login']))
Using SecureObject to wrap around my root controller, I can specify
the require attribute on object instantiation along with a list of
methods to be excluded from the require attribute (e.g. login).
Also, SecureObject, like SecureResource, catches Identity exceptions
if you are doing your own identity checks inside the methods.
--Renier
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---