Using rules to set content permissions

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
midlake's picture

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!

Comments

I don't think you need rules

dpatte's picture

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

midlake's picture

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)

Itangalo's picture

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

Yuri's picture

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

nikhiljain's picture

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: