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!