Display a rules link only if the content access to display is granted

by Quentin   Last Updated January 08, 2018 13:07 PM

I'm using the Drupal Commerce 7.x, Rules Link, and Content Access modules

Ok so here we go, in my site you can add ads and then people can pay credits and then pay with them to unlock contact informations.

So for exemple when an advertiser create an ad 2 things happen : - a content type "classified ad" is created, - cloned and converted in content type "classified complete"

Now we have 2 different nodes the first one is a "classified ad" et the second one is a "classified complete".

The content type "classified ad" is the node who have less informations and the content type "classified complete" is the node who have all informations. They are all linked together with "rules link".

The node "Classified ad" is displayed for everyone and the node linked to it "Classified complete" is displayed only if paid by a user.

I want to display a link rules in "Classified ad" nodes who check :

  • the current user is an authenticated user (done)
  • the current user already bought the node "Classified complete" so he has an access granted to that node (with content access).
  • a page redirect to the node "Classified complete"(done).

I don't know how to check if my current logged in user already have an access granted to a node id

I hope my explanations are clear, if you want more info do not hesitate, Thanks in advance !

more infos there too : How to access node properties of another node using the Rules Link module?

Tags : nodes rules


Related Questions


Clone nodes and change fields with Rules and VBO

Updated May 20, 2015 20:03 PM