UPDATE: Andy Kirkham (ajk^ in IRC) has volunteered to do this lesson this Sunday! Cheers! --joshk
This lesson will provide an introduction to db_rewrite_sql() and Drupal's node access system. What is db_rewrite_sql() and why should I care? Initially, we'll create a basic module that uses hook_db_rewrite_sql() to implement a basic node access system that demonstrates what happens internally.
Once the concepts are grasped we'll lift the hood on some Drupal access control contrib modules and see how these work using Drupal's node grant system.
Basic Node Access Control
- Create a basic module that restricts access to anonymous users but allows access for authenticated users on certain nodes.
- Our personal access table and pre-populating it (for demonstration purposes).
- hook_form_alter() to add a checkbox to the node edit form.
- hook_nodeapi() to create a flag on the node and apply viewing access control.
- hook_db_rewrite_sql() to implement the list view access control.
Basic Taxonomy Access Control
- Using hook_db_rewrite_sql() to implement the list view access control by taxonomy.
- Working around Drupal Core's update limitation.
Drupal 5's node_access system
- Introducing Drupal's node_access table.
- Table initialization and maintenance (node_access_rebuild).
- A look at the node_access_example module
- Walking through the code of Forum Access module and it's use of the ACL module as a working example.
- time permitting Lifting the lid on Taxonomy Access Control Lite.
- time permitting Lifting the lid on Simple Access module.