it seems that taxonomy_browser does not work well with taxonomy_access:
the taxonomy.patch coming with taxonomy_access patches taxonomy_form by adding two more arguments to the call of _taxonomy_term_select so only terms where users have the 'create' right for in the taxonomy acl will show up in the select box. this is wanted behaviour if the form is used for e.g. assigning a node to terms of a vocabulary but in taxonomy_browser this function is used in a different way.
my solution was to add a customized version of the function taxonomy_form that calls taxonomy_term_select with the user right set to 'view' instead of 'create'. attached is a small patch against version 4.6.0 of taxonomy_browser that works for me.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | taxonomy_browser_with_taxonomy_access_0.patch | 402 bytes | keve |
| taxonomy_browser_with_taxonomy_access.patch | 1.17 KB | kpi |
Comments
Comment #1
davidgibbens commentedI think this must a related problem but please note I am just a site owner/admin and don't have technical skills and apols if I've got this wrong or this is not the right place to post:
I have both the two above modules installed.
Recently logged in as a user with lesser privileges than normal (mostly I'm in the site as admin).
Went to try my taxonomy search - and noted that none of the terms in the vocabs were visible. Found this applied to one or two other user categories as well.
After a lot of searching around and experimenting finally realised that the critical factor was that, in access_control>permissions the users who could do the taxonomy search had "administer taxonomy" privileges set. With this set, the relevant boxes (ie vocab drop-downs) come up in the taxonomy search screen.
However - and this is where taxonomy_access comes into the picture - now some forums that were previously hidden from some categories of users become visible in the forums list. Presumably having administer rights to taxonomy means you can see all the terms, even though in category permissions there is no view access for those terms. Fortunately users can't see the actual nodes within the forum so the access control mechanism does still seem to work. Being able to see the forum does also enable the user to post to the forum - although they can't see their own post.
Just coming from a common-sense point of view I'd see any "bug" as lying in taxonomy_browser as it is counter-intuitive to need administer rights to taxonomy in order to be able to search (ie view) content.
Comment #2
davidgibbens commentedPS - but if the situation is in part caused by the patch to taxonomy.module supplied with TAC then it could be viewed as a bug in TAC
Comment #3
keve commentedDear davidgibbens,
You should not give "administer taxonomy " permission to normal users.
I tried the patch above, for me it seems ok.
Have you tried the patch supplied above?
(Note: for using taxonomy_access CVS there will be no need to patch taxonomy.module anymore. The taxonomy handling is completely rewritten, with hook_db_rewrite_sql. That may solve this problem, too).
Regards,
Keve
Comment #4
keve commentedI updated patch supplied by kpi.
(it is for 4.6 - taxonomy_browser.module)
Comment #5
davidgibbens commentedHi
I think I've got confused between patches. taxonomy_access comes with a patch to taxonomy.module. I didn't look closely enough at the original post which says that this is a patch to taxonomy_browser to help it work with taxonomy_access - and I haven't installed it. So I'll do that and let you know.
Comment #6
keve commentedComment #7
keve commentedI commited to 4.6
I solved it with taxonomy.patch (taxonomy_browser is not have to be changed.)