I know there was support in the 6.x version of this module for a views filter on node views. This is a little different request: a views field for taxonomy term views. The use case is a view of taxonomy terms (say, in a block listing of categories for the sidebar) with an icon indicating whether you have view access to the content behind the term. To make that possible, we need a field that lists which roles have view access.

CommentFileSizeAuthor
#1 1438232.tac-views.patch2.53 KBksenzee

Comments

ksenzee’s picture

Status: Active » Needs review
StatusFileSize
new2.53 KB

Here's a start at a patch for this. I tried writing a query that would pull in vocabulary and global defaults as well as term-specific grants, but I got lost in a maze of twisty left outer joins, all alike, and gave up. Term-specific grants are good enough for my particular needs, but I'm hoping someone else can supply the deficiency there (marked with a TODO).

It would also be great to extend this to edit/delete/etc. grants; all it needs is an option on the handler. I didn't have time to put that together, but I can, if there's interest.

xjm’s picture

Rather than writing a new query, could we use the TAC query builder helper function? The base builder is _taxonomy_access_grant_query(); _taxonomy_access_node_access_records() has an example of how it's used.

(I've considered subclassing core SelectQuery as a special TAC query class, but been hindered by "no idea what I'm doing" and "not sure if that would actually help anything" factors.)

ksenzee’s picture

Yeah, I tried that, and didn't surface until two hours later, with a query that returned I have no idea what. :/