Menu

Trac Commit Log


Commit Date  
[r4565] by cboos

PermissionPolicy: also merged [4563] (blame in scoped repos fix)

2007-01-13 22:22:42 Tree
[r4564] by cboos

PermissionPolicy: merged with trunk@... (blame branch integration -> addition of ''version'' information in the Context)

2007-01-13 22:19:16 Tree
[r4563] by cboos

Fix for the blame feature in case a scoped repository is used. Thanks to Manuzhai for reporting the issue and suggesting a fix.

2007-01-13 20:00:31 Tree
[r4562] by cboos

PermissionPolicy: init svnmerge properties for facilitating merges from trunk

2007-01-13 16:39:45 Tree
[r4561] by cboos

Add Blame feature to TracBrowser by integrating the branch source:sandbox/blame@.... Closes #629.

2007-01-13 15:31:56 Tree
[r4560] by cboos

Blame branch: merged [4540:4559/trunk], plus added a workaround for extraline generated by the highlighter (probably due to r4548)

2007-01-13 14:23:51 Tree
[r4559] by cboos

Use Pygments' `__version__` information, if loaded from source and no pkginfo data can be found.

2007-01-13 13:45:59 Tree
[r4558] by cboos

PermissionPolicy: follow-up to r4557, as `self._context_map != self._resource_map`

2007-01-13 11:27:34 Tree
[r4557] by athomas

PermissionPolicy: Some minor refactoring plus fixed a privilege leak in the `PermissionCache`.

2007-01-13 00:30:15 Tree
[r4556] by cboos

PermissionPolicy: reworked a bit the !ResourceSystem

{{{
#!python
class IResourceMapper(Interface):
"""Map between Trac resources and their corresponding contexts."""

def get_resource_factories():
"""Generator yielding `(realm, resource_factory)` pairs.

The `resource_factory` is a function taking a `Context` and
returning an instance of a Resource subclass.
"""

def get_context_classes():
"""Generator yielding `(realm, context_subclass)` pairs."""
}}}

Example implementation:
{{{
#!python
# IResourceMapper methods

def get_resource_factories(self):
def wiki_page_factory(context):
from trac.wiki.model import WikiPage
assert context.resource == 'wiki'
return WikiPage(self.env, context.id)
# TODO: add `context.version` after blame integration
yield ('wiki', wiki_page_factory)

def get_context_classes(self):
return [] # base Context is OK so far, but could be:
# yield ('wiki', WikiContext)
}}}

More Context related changes:
- finish the s/resource/realm/ renaming started in r4552
- rename s/object/resource/
- `from_resource(req, resource)` doesn't need an env parameter,
as this is assumed to be available from the `resource`
- I think the above method is enough for getting a Context from a resource,
so I've reverted r4551
- fixed the `__call__` method and make it clearer
- documentation updates

In the !PermissionCache, effectively cache the results of the permission check. Ideally, those results should be cached at the Request level, I think.

2007-01-12 19:02:32 Tree
Older >
Auth0 Logo