TagSystem.get_tags(req, resource) should not need a full req object.
|Reported by:||Daniel Kahn Gillmor||Owned by:||Steffen Hoffmann|
I'm trying to implement an IPermissionProvider on Trac 0.11 using TagsPlugin 0.6. My goal is to make it so that wiki resources given a simple tag (e.g.
public) are visible to anonymous users.
This means that i'd like to call
TagSystem.get_tags() from within
get_tags() takes a req and a resource, and
check_permissions() doesn't have access to a req.
coderanger suggested some stack hackery to find the req as a workaround. I did that, but even with that working, there is a recursion problem: the call to
get_tags itself checks permissions on the object to get a list of the tags. This leads to infinite regress.
It might make more sense if
get_tags took arguments of
(perm, resource) instead, and if
perm was optional. This way additional plugins could reason about the tags of a given resource without requiring that the user in question already have access to them.
Change History (7)
comment:1 Changed 6 years ago by
|Owner:||changed from Alec Thomas to Steffen Hoffmann|
|Type:||defect → enhancement|