Hello,

I am trying to do the following in Drupal 7:

Users in my website will post ads and others will pay to get in touch with the author of the ad. Users that are buying the contact information have to see all of the content of the ad(node), except for the author. After they pay, they should see an extra field in the ad, telling them who the author is.

My question is: How can I control the user access per node and per user for a specific part of the node? Are there any modules for this? Also, a relation between the user and the ad would be nice, since I will later have to list all ads for a user, etc..

I found many plugins, but they seem to deny or allow access to the entire node and my functionality should be different.

Thanks in advance

Comments

Jaypan’s picture

https://www.drupal.org/node/644164

You can move the thread by editing the original post and choosing 'Post Installation' as the forum.

Thank you.

I will soon be leaving the Drupal forums permanently. To understand why, please see this thread.

DreamWave’s picture

I am expecting a programatic solution to the issue.. that's why I put the post there.
You are right though, this seems more appropriate. I moved it.
Thanks for correcting me.

Jaypan’s picture

Are there any modules for this?

This made it sound like you were looking for a module based solution.

I will soon be leaving the Drupal forums permanently. To understand why, please see this thread.

boban_dj’s picture

Hi,
drupal commerce modules work well with rules module, you can set up a rule per user or role and grant them access.
If you goto drupal commerce site
here there site with video tutorials:
https://drupalcommerce.org/videos

I am not sure but here some video sinular what you need.

It seems a lot commerce, but very good based code and nice implemenation for drupal site.
https://drupalcommerce.org/videos/tutorials/selling-pernode-access-drupa...

goodluck

Boban_dj

DreamWave’s picture

Hello and thank you so much for answering.

I am currently using the default version of Drupal 7 - not drupal commerce.
I have made a lot of modifications and it will be difficult to start from scratch if I have to change the underlying system.

Also, don't these rules limit the access to the entire node? I need all of the nodes visible, but some of their fields should be hidden (like author).

Thanks in advance

boban_dj’s picture

I would suggest you check out the video tutorials at commerce guys,
Theit integration with the rules module is quite good. Also you can configure any field however you like.
Commerce is a bit hard to understand at first but once you get the grip it is pretty powerful.

The way I could grasp their concept more easy, is to think of the product displays as the products that you will publish on the website, and the product variations as the back-end of your product managment (your "database products")

Also the rules you can combine with components (Components are stand-alone sets of Rules configuration)
But again, you should watch some of the excellent videos from the Commerce guys i posted in the previous answer.
In the long run you can have it as you wish, and the have all your "normal" Drupal still working. This is what I liked about commerce. It is very much built with Drupal not around it.

Node one from Sweden has an excellent video in Rules module here:
http://nodeone.se/sv/node/32

You can check it out and try with rules to make it.
again goodluck.

Boban_dj

DreamWave’s picture

I will go trough everything you suggested.
Thank you!