I'm creating a site where there are 50 variations of a basic page node. The site is not viewable publicly and the user has to login in order to view the site.

I have enable the URL login module, its setup where you can login to the site by going to a url.

Now there are 50 different users and each user has access to view only one of the variations of the node. I setup a taxonomy vocabulary called version with 50 terms in it and assign one of them to the node.

  • How do I restrict certain users to view only that content that matches the term they are allowed to?

2 Answers 2


There seems to be good handful of permission access type modules restricting users to a specific node.

I tried taxonomy access and taxonomy access lite and they dont do what I need as they limit access to a taxonomy to roles only and not doable for specific users. A work around would have been create a bunch of roles. But I have 50 different users that need 50 different access rights to certain pages.

I also tried https://www.drupal.org/project/permissions_by_term but that was a bit wonky as this didn't restrict via the access restriction table. So items still showed in the menu even though they didn't have access to it. Upon clicking on the menu, they do indeed not have access to it, but I wanted all node references to this restricted node removed from the page.

I finalized on the Flexi Access module: https://www.drupal.org/project/flexiaccess

This gives the ability to restrict specific users to a certain node page, but does not restrict by taxonomy terms or by role.

It will add a new flexi access tab on your content pages.

enter image description here


You could use hook_node_access() to check the user account and the node being accessed to see if they correspond.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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