I appreciate this is supposed to be a lite and simple module and this is the closest I have found to what I need.
However, my users create a profile based on various taxonomy terms using content profile. With TAC_lite, as far as I can see, admin has to manually add the same taxonomies under the access by taxonomy permissions tag. What I'd like is for the user selected taxonomies to be used automatically.
The use for this is that users sign up and indicate in their profile the kind of content they want to see, then another subadmin role creates content that is only relevant for users who have selected the same taxonomy in their profile.
I am an admin user not a programmer, and would appreciate any pointers on how this would be achieved.

CommentFileSizeAuthor
#4 1010844-tac_lite-logical-and.patch7.47 KBmrfelton

Comments

Dave Cohen’s picture

Status: Active » Fixed

When you configure tac_lite, you make 1 or more schemes. On the scheme admin form, uncheck "Visibility". That way, users will see all the terms, but not all the nodes tagged with the terms.

cham74’s picture

Status: Fixed » Active

Thanks for the quick reply, but I am still missing something... As an example, I have one user who has selected from a taxonomy in his content profile that he is a painter and from another taxonomy that he is in Paris, and I have another user who also selects painter but is from London. The subadmin produces a node that he adds the taxonomies Painter and Paris which the user 1 should see but user 2 who is from London should not see.
The only way I seem to be able to go and do this is to add the taxonomies as admin under the taxonomy permissions tag, which with lots of users and taxonomies is an impossible task.

Dave Cohen’s picture

you're trying to logically AND two terms together to make a permission.

Drupal logically ORs the grants. Both users can see all nodes tagged "Painter". That's how it is supposed to work.

search d.o and you'll find lots of threads about this, and how what you want is not easy in Drupal. In D7, there are node access alter hooks which will make that sort of thing much easier to customize.

mrfelton’s picture

Status: Active » Needs review
StatusFileSize
new7.47 KB

The attached patch adds a new 'Require all terms' option into the Scheme settings page. When checked, permission is granted to a node only if the user has been assigned at least all of the terms that are assigned to the node. It does this by generating a crc32 the combined terms.

Dave Cohen’s picture

I'll leave the patch here for others to see, but I don't plan to add it to the module. D7 has node_access_alter(), which is perfect for this sort of thing, while this patch adds complexity that I don't want to support in the future.

I'm resistant to anything that makes tac_lite less lite. But I appreciate you sharing the patch, thanks.

damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Thank you for your contribution to this module. Support for Drupal 6 ended a decade ago, so I'm closing out this issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.