Closed (fixed)
Project:
Taxonomy Access Control
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2010 at 15:22 UTC
Updated:
18 Sep 2010 at 01:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
mr.andrey commentedBy the way, until now, I've had this working with an argument:
But unfortunately at around 300 nodes it gets overwhelmed, and just ignores the rest.
I need help translating this into a views filter.
Andrey.
Comment #2
mr.andrey commentedOK, here is the "patch" (sorry not sure how to do multi-file patches).
This adds filters for each of the TAC permissions: view, update, delete, create, list (see under Node).
In taxonomy_access.module, add this (to the bottom or anywhere really):
And unzip the attached "includes" folder file inside the taxonomy_access module folder.
I've tested and it seems to be working just fine.
Tutorial on how to write a Views filter
Best,
Andrey.
Comment #3
mr.andrey commentedHere's the actual patch. And just for reference, here's the command for creating recursive multi-file/folder patches:
Comment #4
xjmInteresting. I know there's a patch out for Views itself to filter by whether the user has Edit permission for the node, etc., but that would not cover TAC's create/list.
+1. I'll try to do some more testing with this patch.
Comment #5
lhristov commented/** EDITED
Great idea to add view filters. It is exactly what I need. It seems to not work for me for anything but the TAC grant view.
I get an error for each other filter field:
"Error: handler for node > taxonomy_access_update doesn't exist!"
If I'm trying to add TAC grant delete the error changes to
"Error: handler for node > taxonomy_access_delete doesn't exist!"
Any ideas?
Thanks
*/
Figured it out:
The names of the classes in the includes folder are wrong for each handler
class taxonomy_access_handler_filter_view
should become:
class taxonomy_access_handler_filter_create
Comment #6
mr.andrey commentedNice catch, thanks!
Here's the updated patch.
Comment #7
egghunter commentedSubscribing
Comment #8
xjmI'm now using this feature on one of my sites. Very nice. I plan on committing this with a few minor changes, unless anyone else reports any trouble with it.
Comment #9
xjmCommitted after some cleanup:
http://drupal.org/cvs?commit=416050
Comment #10
xjmThis feature is now available in the dev branch. One thing I notice is that this filter only returns term-specific grants for the node, and excludes grants inherited from vocabulary or global defaults. I have opened a separate issue for this at: #901938: Views filters exclude nodes with grants inherited from global or vocabulary defaults