NOTE: This module's maintenance status is "unsupported", and its development status is "obsolete".

There are many user access modules providing permission control, but they act only at the level of roles. Taxonomy Based Permissions(TBP) provides an interface for managing user permissions at a very low level with the help of taxonomy; taking care on content types, node grants, delegation and inheritance of permissions.

HOW TO USE

Go to TBP's settings page(admin/user/tbp) and assign vocabularies to content types, in order to let TBP went into permissions scene.
Once you've done configuration, You'll notice a new tab: "Permissions" in node or term pages matching following conditions:

  • Taxonomy term is part of one of the categories you activated at TBP settings.
  • Node's content type match with the ones you activated at TBP settings and Node's term is part of one of the categories you activated at TBP settings.

Contributing Add-ons/Plug-ins

If your module extends core's Node module (i.e: CCK adds fields functionality), You can easily allow TBP manage your module permissions.

By example, a module displaying something in node's view just for users with access to "display something" permission, validation code might look like this:

if (user_access('display something') || tbp_access('display something', $node)) {
  return theme('something', tags_list());
}

TBP will look at its very own permissions table defined by hook_tbp_grants():

/**
 * Implementation of hook_tbp_grants().
 */
function hook_tbp_grants() {
  $perms = array('display something');
  $grants = array();
  foreach ($perms as $grant) {
    $grants[$grant] = (object)array(
      'id' => $grant,
      'name' => $grant,
      'description' => 'Displays something in node pages.',
    );
  }
  return $grants;
}

NOTICE: Hook implementation should return an array of grants, where every grant is an object with properties: id, name and description.

For more examples see TBP code, which comes with a built-in plugin for RSVP module. Google Picasa module fully supports TBP.

GETTING MORE GRANULARITY

If you want even more granularity with the benefits of TBP's delegation and inheritance, try out NAT module, which automatically creates a taxonomy term for every node, so you can assign permissions for a user to an specific node.