A quick follow-up, I've implemented the above ideas in r4556 (which also 
finishes the renaming started in r4552).
This also reverted r4551 for the reasons explained in the previous mail.


Christian Boos wrote:
> ...
> class Resource(object):
>     """Base class for resources."""
>
>     realm = 'unknown' # needs to be overridden
>
>     # Note that an `.id` property needs to be set for the instances as well
>   

Of course, at this point, no real Resource class is actually needed. 
This will probably change once we start with the GenericTrac stuff, but 
for now all what is required are the additional realm and id properties 
in each data model class.

> And here's the helper function I was talking about:
>
> def create_context(resource, req, *args, **kwargs):
>     ...
>   

... and since then, I've discovered Context.from_resource(), which can 
perfectly be used instead of the above ;)

One thing I'm not totally pleased with is the way you changed the 
PermissionCache.
Is there any reason for not having a permission cache at the level of a 
request?

-- Christian


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Trac Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to