Home

Primary links

  • top o the deck
  • Drupal for Beginners
  • about
  • links
  • give me some sugar

Drupal stuff

  • EDAM
  • STARDOM
  • Question Bank
  • Drupal musings
  • Drupal tips
Home Blogs Drupalace's blog

Key stuff on this site

Easy Drupal Admin Manual (EDAM)

SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)

Drupal for Beginners

Subscribe to posts by RSS or email

Subscribe to Drupal Ace by RSS feed RSS feed 

Subscribe to Drupal Ace by Email

Donate towards my web hosting bill! Get a great host!

Share and save

Share/Save

Random piece of content

2008 is here: the Drupal Ace to-do list

Manuals on this site

  • Easy Drupal Admin Manual (EDAM)
    • Welcome to Your Site
    • First Steps: Please Read!
      • Understanding These Instructions
      • Important Terminology!
      • Best Practices for Site Admins
    • Super Quick Guide (for the experienced and the brave)
    • Logging In
    • Your Administrator Tools
    • Setting Site Basics
      • Setting Site Information
      • Configuring Your Theme
    • Creating Content
      • Node Types
      • Create a Page Node
      • Create a Story Node
      • Create a Blog Entry Node
      • Making Images and Other Files Available
      • Using Text and Image Editors
    • Organizing Your Content
      • Terms, Vocabularies, and Taxonomy: "Tagging" Your Content
        • Taxonomy Suggestions
      • Menus, Links, and Paths: Navigating the Site
        • Content Paths and URLs
        • Creating Links
        • Working with Menus: Administration Form (Drupal 6)
        • Working with Menus: Administration Form (Drupal 5)
        • Creating Menu Items on the Fly
        • Placing Menus on Your Pages
      • Placing Content on pages
        • Creating a page from a Single Node
        • Creating a page from a List of Nodes
        • Setting the Front Page
      • Working with Blocks
    • Maintenance Stuff
      • Maintenance and Construction Notices
    • Other Fun Things
      • Changing Color of Garland Theme
      • Free Aliases!
  • SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)
    • Set a Clear Goal
    • Make a Good Site
      • Put out the Welcome Mat
      • Make Great Content
      • Build a Great Brand
      • Make Navigation Easy
      • Tune Site Performance
    • Drive Traffic
      • Promote your Site
      • Get Found with SEO
    • Build a Community
      • Build an Offsite Community
    • Monitor and Improve
    • One-Page Checklist
    • Drupal and the Blogging Starter Checklist
      • Drupal and the Blogging Starter Checklist, Part 1
      • Drupal and the Blogging Starter Checklist, Part 2
      • Drupal and the Blogging Starter Checklist, Part 3
      • Drupal and the Blogging Starter Checklist, Part 4
      • Drupal and the Blogging Starter Checklist, Part 5
      • Drupal and the Blogging Starter Checklist, Part 6
      • Drupal and the Blogging Starter Checklist, Part 7

Recent comments

  • It worked

    adding $GLOBALS['tempUser'] = $user; worked but I find it worth noting that I had to delete...

  • very good document...

    very good documentation for beginners!!!!!! thanks!!

  • del penitential 62

    strike out abject
    eliminate penitent 5

  • Chat

    Thank you a lot about very beneficial to my work was very useful thank you

  • Drupal Resources f...

    I would start learning from the "Diving In" section above. That links to the good beginners'...

more

Limiting node access: three quick'n'easy tools

Submitted by Drupalace on Sat, 2008-08-30 13:49
  • access
  • Drupal
  • modules
Keep it secret! Keep it safe!

There are several easy, handy modules for limiting access to specific nodes. I always have trouble keeping three of my faves straight – partly because they all start with "P" – so here I'll write them down for my reference and yours. (Note: I'm talking Drupal 5.x.)

The three easy P's

"What's the password, Bub?": Protected Node module

This module adds a 'Protected node' item to your node edit forms; if you want to password-protect the node, just hit the 'Node is protected' checkbox, and enter a password. (Passwords are on a per-node basis; you don't set a global password that'll take care of all protected nodes.) There's even a JavaScript-based password quality checker.

On the Access control form, you choose whether to grant a role any access at all to the protected node; those without that access permission head to your "access denied" page. So you get two levels of protection (am I writing a deodorant commercial?): a password needed for any role to view the node, and role-based permission that can prevent a role from even seeing the password input form.

Note: On the Modules form, Protected Node shows up way at top under "Access", not later under "Other". 

http://drupal.org/project/protected_node

"Members Only!": Private module

The Private module adds a simple 'Private' checkbox to a node's edit form. Check it, and the node can be viewed only by the node's author and by roles with the right permissions. Other users get your "access denied" page. 

You set permission to view private-marked nodes via the "Access Control" form, of course. This is a global permission; roles with view permission can view all private-marked nodes. The module doesn't grant the ability to set viewing permissions on a per-node basis.

A good use for this module is to restrict some nodes from anonymous (non-logged-in) users, creating "members only" pages. (You could also grant anonymous users permission to view private nodes, but giving everybody viewing permission makes the module useless! Go ahead and discriminate!)

http://drupal.org/project/private

"Just one bite!": Premium module

This module places its "Access restricted for non-premium users" checkbox under the "Publishing options" item on a node's edit form. It provides a handy middle-ground between no access and Full Monty: roles without "access premium content" permission can see only the node's teaser, followed by a terse "Full text available to premium subscribers only". 

That makes it handy for any site in which everyone gets a sample of the goods, but only registered (which may mean paying) users get the whole thing.

Like the above, users with permission to access premium-marked content will get to access it all; there's no fine-grained control for setting role-based access on a per-node basis.

http://drupal.org/project/premium

Other modules

There are a lot more access-control modules out there, including heavy hitters like ACL and Content Access. See the big list at User access/authentication modules.

I like the above three, though, as light-weight solutions for smaller sites that don't require fine-grained access systems, just a quick way to keep certain nodes out of certain hands. Keep 'em handy in your toolbox!

Share/Save
  • Drupalace's blog
  • Printer-friendly version
  • Quote
drupalist's picture

Drupal rocks @mike hunter the

Submitted by drupalist (not verified) on Wed, 2010-04-28 17:22.

Drupal rocks @mike hunter the list of wish to do its pretty easy just search at drupal specialized sites.

John cusac @ <a href="http://www.btscene.com">BTscene</a>

  • reply
  • quote
Mike Hunter's picture

I am looking to create a node

Submitted by Mike Hunter (not verified) on Wed, 2010-03-03 18:20.

I am looking to create a node access method to answer these specific needs:
1. My node represents a Business which is created by some super user.
2. This super user can now edit all of the Business fields.
3. This super user can now dynamically grant node specific access to the business staff members.
4. Business staff can only edit part of the node fields.
5. I would like to use existing (and reliable) modules if possible.

as simple as it may sound I'm still not sure which method is the right one for me.
I am new to drupal so I might be unaware of drupal best practices.

that's why I want your help and knowledge. on my turn I'd like to suggest your using the best http://www.mp3hunting.com mp3 SE. enjoy!

 

  • reply
  • quote
Drupalace's picture

Node and field permissions

Submitted by Drupalace on Wed, 2010-03-10 18:15.

It looks to me as if #1 and #2 are handled by general Drupal permission features. #3 should be workable with the fancy tools of the ACL and Content Access modules – both reliable, or at least I haven't heard of any big problems with them.

For #4, it appears you want to set permissions per field, not just per mode. It's not an area of my experience, but there are some modules that look promising. First and foremost, Drupal6 apparently builds the functions of the old CCK Field Permissions module into the CCK suite of modules. So if you have the CCK module(s) installed, there's a good first place to look.

These might also help:

  • Field Permissions http://drupal.org/project/field_permissions
  • Field Permission Administration http://drupal.org/project/fpa
  • Workflow Fields http://drupal.org/project/workflow_fields

Any luck?

  • reply
  • quote

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p>
  • You may quote other posts using [quote] tags.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options


Relevant Content

The Drupal Ace logo has dealt these content suggestions from the deck.

  • Why would Color-enabled themes work for all sites but one?
  • Dumb mistake #27747: Wrong module version
  • Putting Seth Godin to work
  • Sweet module love: the What Would Seth Godin Do? module
  • Find and rate Drupal modules
  • Working with Menus: Administration Form (Drupal 6)
  • How to fix "Access Denied" for visitors?

Learn Drupal, hands-on

Get the beginner-friendly ebook that teaches community site building via a live case study.

Drupal 6 Ultimate Community Site Guide

Read the review

Drupal mini tip

Site visitors seeing your ugly error messages on the screen (along with details of your Drupal installation path)? Once your site goes from dev to launch, you probably want to have errors recorded in the log but not splashed across the screen. Head to the handy Error Reporting settings found at admin/settings/error-reporting. 

It's a deal!

Dreamhost dealsDrupal Ace presides over his domain, proudly ensconced in his DreamHost eyrie. Won't you join me?

Promo code deal!

Just enter the code 49ER when you register for an account, and save $49 off the already-low price. No strings!

Read my hosting service review

Powered by Drupal, an open source content management system

Copyright 2007 and forever after. Made with Drupal, of course. On OS X, of course. Served up by DreamHost. DreamHost

RoopleTheme