Perfect Drupal content access module

UPDATE: I have put my solution in a new module, Restricted Content, detailed in a later blog post.

I've been looking through all the Drupal content access modules for a nice module to use on my other blog, davenjenny.com. I've been looking for the following features:

  • Per-node access restricted by user roles
  • If a node is restricted to user, have an option to show a nice message like "Sorry, this post has been restricted to uses with the following roles: registered user, friend."
  • If the node is restricted to registered users and the current user is anonymous, also show a message like "Please create an account to view this content."

Probably the closest thing to what I'm looking for is the Node Privacy by Role or Content Access modules, but I'm almost leaning towards rolling my own module.

Anonymous's picture

Unfortunatly I had the same.. though my complaint was that none of the access modules use the drupal style access (permissions!). Thats why I created http://drupal.org/project/node_access_control.

This one is still in beta and the 6 version has been ported but not yet released. The last two features you address are nice additions which I can implement or you can submit patches if you want to.

Dave Reid's picture

That's an interesting solution too! Unfortunately I went ahead and created the module before I noticed yours or your comment today. :) I have detailed it in my latest post. My first hesitation is that your solution could possibly have a negative affect on the permissions system for a larger site, but we could work together on a good solution.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <h1> <h2> <h3> <h4> <h5> <h6> <em> <strong> <code> <del> <ins> <blockquote> <q> <cite> <sub> <sup> <p> <br> <ul> <ol> <li> <dl> <dt> <dd> <a>
  • Lines and paragraphs break automatically.
  • Twitter-style @usersnames are linked to their Twitter account pages.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.
Syndicate content