[development] deny user #1

Augustin (Beginner) drupal.beginner at wechange.org
Wed Sep 13 12:11:24 UTC 2006


I have a module where I define a new node type (created with the usual hooks, 
hook_node_info(), etc.). 
The nodes of this type are created and updated when importing data from a 
remote server.

In drupal, $user->uid == 1 has all the rights.
I would like to prevent this user #1 from creating / updating such nodes.
All users may view the nodes.

What is the best way to accomplish this?

Returning FALSE on hook_access() when $op != "view" doesn't work for user #1.



Because we and the world need to change.
Intimate Relationships, peace and harmony in the couple.

More information about the development mailing list