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.
Comments
¡Maravilloso! Just what the
¡Maravilloso!
Just what the doctor ordered!
Hope it happens this Sunday.
Will ACL be on the horizon somewhere?
Victor Kane
http://awebfactory.com.ar
Victor Kane
http://awebfactory.com
Yeah, this is a great topic --
and I second Victor's question: will the ACL module be in the house? I'd love to see some discussion of user controlled node level access control that respects OG access controls.
Andy -- take it away!
Cheers,
Bill
FunnyMonkey
4.7
It's great to learn the node access system. thank you!
It'd be helpful if the teacher can point out any significant differences between 4.7 and 5.0 for people who are on 4.7.
Thanks!
This is something that I've been wanting for a while. We should probably test out the skypecast et. al. today or tomorrow to avoid last Sunday's problems. Ping me if you coul duse a hand with that. I'll tr to be in the dojo channel when I can.
Tresler Designs
CNDP, LLC
Might be worth looking at this
http://groups.drupal.org/node/1688#comment-8582
Cheers,
Bill
FunnyMonkey
I think that link is in the drupaldojo.com site
Bill,
I'm pretty sure we added that link to the lesson at http://drupaldojo.com/lesson/lesson-8-node-access-db-rewrite-sql
[/senpai]
Joel Farris | my 'certified to rock' score
Transparatech
http://transparatech.com
619.717.2805
Finally finished the wiki class notes!
Andy, I have finally finished the wiki class notes (it was an excellent class and you really deserved to have the notes put up at last):
Lesson #8 Class Notes wiki -- db_rewrite_sql() and the Drupal 5's node_access system
Please take a look for quality control purposes. Everything is done except for the last 5-10 minutes, please feel free to edit the wiki.
Victor Kane
http://awebfactory.com.ar
Victor Kane
http://awebfactory.com
Excellent Job!
I browsed through the wiki, wonderful job. :-)
Question: Wouldn't it be helpful to provide the link to the Screencast?
-s
I put that in...
I went ahead and put that in (of course, it is posted on the http://www.drupaldojo.com site, where, as a torrent file which may tend to be time dated, any update might make more sense), it is a great screencast.
Victor Kane
http://awebfactory.com.ar
Victor Kane
http://awebfactory.com