If the permissions_by_term module is used, the functionality of your module has no effect.
If the permissions_by_term module is controlling access to the nodes, your module does not control access.
Active
1.6
Code