0

I want to be able to programmatically enable and set taxonomy access control for the anonymous and authenticated roles. Specifically, I want to deny anonymous and authenticated users from being able to view or edit nodes tagged with a particular term. I know how to do this through the admin interface. But I'd like to be able to do this programmatically.

I can see functions to get the grants for a particular role, but not set them.

Thanks!

  • Hoping that adding a comment will push this back to the top, maybe someone knows. I've programmatically created two new terms in a vocabulary and now want to enable taxonomy access control for them both. I'd really rather not step through the debugger, but seems this might be my only choice. Hard to believe no one has done this before. – Patrick Oct 2 '13 at 3:20
0

Check out this page: http://drupalcontrib.org/api/drupal/contributions!taxonomy_access!taxonomy_access.module/group/tac_grant_api/

I'm currently attempting to implement the same functionality and it seems that this provides everything I need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.