The TAC module, short for Taxonomy Access Control, gives you the ability to manage Access control for user roles based on taxonomy categories (vocabulary, terms) in Drupal. Sounds effective but how to use it is the key! I have talked with many people who need this sort of functionality and knew of the existence of this module, but could not figure out how to use it. I’ve got a step by step guide here for you on how I used it to make things a little more easy for you.

Practical Use of the TAC Module 

So why and when would you use this module for Drupal?  Let’s say you wanted to give specific users access to edit certain pages on your website, and those certain pages only! Or, let’s say you just have a “premium” section of your site that you want people to register for an account for before they can access it! These are two classic examples of why you would need to use the TAC module.

In my case, I needed it because a client of mine needed both mentioned above. He needed to give a certain page acccess only to those who are logged in. And also, he wanted to make a category of pages on his site editable by certain members of his staff. I went through alot of troubleshooting and about 5 hours of head scratching before I achieved my goal with this. So below are my specific steps to accomplish this saving you some serious time!

Step 1 – Install TAC Module

Let’s start this off right. Install the module just like you would any other module. The link to the module is at the beginning of this blog post. If by chance you already have the TAC_Lite module installed, install it first before installing this module. If you don’t know what i’m talking about, then don’t worry about it. Move on.

Step 2 – Create User(s)

For users that I want to have edit acccess to pages, I first created those users in my system. For the “premium” content users, I don’t need to create them. They are just classified as “Authenticated” users inside Drupal. You create a new user by going to User Management >> Users >> Add User.

Step 3 – Create User Roles

Now we need to create specific user roles. This is done by going to User Management >> Roles >>.  These roles are important because they let you specify multiple situations. In my example I needed two situations, one where the authenticated user could view “premium” content and the other where the “tech support” team needed access to all “tech support” pages. So create any user roles that apply to you here.

Step 4 – Assign Users to Roles

Now that you have your roles created, the user needs to be assigned to a role in order for the role to take into effect. When you go to create or edit a role, there is now a checkbox that allows you to select the role that you want for that usesr.

Step 5 – Create Taxonomy & Terms

The next step is that you need to classify the content pages that you are wanting to involve into this whole process. You need to create a taxonomy in my case “tech support” with the needed terms in my case “tech support” again.

Step 6 – Create Content

Now you can create your pages/posts/story etc. In my case I created my “tech support” pages. When you create your new page, you now have a dropdown option that let’s you select the term with the taxonomy that you created. Do that to assign your content page to the correct taxonomy!

Step 7 – Setup TAC Permissions

This is a very important step.  Go to User Management >> Taxonomy Access: Permissions. You will see your new roles that you created. Select on your roles and make the neccesssary modifications here. A stands for allow, I stands for Ignore, and D stands for disallow. Disallow always overrides allow. So make sure you are giving the correct permissions for the 3 main functions of View, Edit, & Delete. You will see that for each role in your Drupal system, you can specificy permissions for each Taxonomy! That’s the beautiful part of this module!

Step 8 – Access To Input Format Types

This part will trick you if you don’t know any better. But here is how it works. Basically when you create your pages, if you want to give someone else access to edit that page, you also need to give them access to the input type that you created the page on. So if you created the page using the Full HTML mode, then you need to go to Site Configuration >> Input Formats >> and select on Full HTML. Then check the boxes next to the roles that you want to have access to this Input Format Type!

I hope that all makes sense. If not feel free to contact me if you need further help. It can be a little confusing when you get into multiple access configurations. But once you get the hang of it it starts to make better sense.