Using rules to set content permissions

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by midlake on July 27, 2010 at 1:28pm

I'm a Rules noob with what could be a very common and easy problem to solve, yet I'm stumped. I have a content type called "resource" that I'd like to partially gate so that anonymous users can see the title and teaser, but not the full body or file attachments without logging in. Is it possible to use Rules to make it so that a user must log in to view the full node for a specific content type?

Thanks!

Categories: , , ,

Comments

I don't think you need rules

Posted by dpatte on July 27, 2010 at 1:38pm

I don't think you need rules at all. There are other moduiles that let you set permissions per field for specific content types - and therefore could hide some fields by making them visible to authenticated users only

Yeah, I just found this

Posted by midlake on July 27, 2010 at 3:14pm

Yeah, I just found this one:
http://drupal.org/project/premium

Perhaps this is a step towards what I'm looking for, but it's in alpha... any others you know of?

Content Permissions (in CCK)

Posted by itangalo on July 29, 2010 at 4:50pm

The Content Permissions module (included in CCK) can be used to set permission levels for each CCK field.

Two notes, though:

  1. Permissions will be empty on default -- you must explicitly add permissions for each field and each role (except user 1).
  2. Only CCK fields are affected -- thus not the normal node body. My suggestion is to disable the body field (by emptying its label in the node type settings) and use CCK text fields instead, which actually also makes it quicker to display its content.

Another approach would be to use Panels instead, and make two different node template variants for different user roles. Describing that is a completely different story, so I'll wait to describe it until you say you are interested. :-)

Good luck,
//Johan Falk, NodeOne, Sweden

Hi Johan, I am definately

Posted by Yuri on August 21, 2010 at 5:21pm

Hi Johan,
I am definately interested in using Panels for different user roles. How did you set that up?
Thanks!

Need help with User permission for node body

Posted by nikhiljain on November 16, 2010 at 7:17am

I have a content type Product which has some other fields like ID, Tag etc alongwith Title and Body.. i want to provide some users with the option to edit only Tag and not other fields.. in User Permissions I am able to provide them permission to edit Tag and restrict them to edit ID.. but I am unable to restrict them to edit Title and Body as there is no such option while setting permissions.
How can I do this?

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /