Level1 Node Access

dldege - June 27, 2007 - 21:42

Level1 implements a simple "level" based node access system using a single vocabulary defined by the taxonomy module. Level based access is defined as a cascading access based on the user level compared to the level of the content. An example makes it more clear.

Say you want to create content and put it into one of 3 levels. You coulddefine a vocabulary, lets call it Level1, with the following terms.

Beginner
Intermediate
Advanced

The vocabulary is non-hierarchical and the terms are weighted as appropriate for the desired cascading order - ie. Advanced is heavier then Beginner.

Now you can start "tagging" your content with any of those 3 options (4 if you also allow "none" which is perfectly valid and a content with "none" is not access controlled by Level1). As with all vocabularies, its also up to you which content types to apply it to.

Next you edit your user accounts and also put users into one of the 3 taxonomy levels (or 4 if allowing "none"). In otherwords, you assign the taxonomy term to your users as well.

Beginner users can now only see Beginner (or "none") content while Advanced users would be allowed to see Beginner, Intermediate, and Advanced content. That is the concept of level access - you can see everything at or below your given level.

You are free to define the vocabulary to your needs, the number of levels, their names, etc. is all arbitrary and only the ordering (weights) is really what matters.

Maybe your levels are Good, Better, Best or Free, Gold, Premium ... its up to you.

This module is simple and light and only implements this very specific access scenario but its very effective and easy to set up.

Important Notes and Current Limitations
Currently I have not made a release and you must get the module from cvs - http://cvs.drupal.org/viewcvs/drupal/contributions/modules/level1/
I consider this code alpha quality and ready for testing, bug reports, and suggestions

Releases

 
 

Drupal is a registered trademark of Dries Buytaert.