The short answer here is that it depends on which access control modules
you're using. If you're using the "og module" it's different then if
you're using "node privacy by role". If I understand it correctly,
without additional modules installed this table doesn't do anything.
You should be extremely careful about modifying this table without using
the API's for the appropriate access module. More info is in the
hook_access on the Drupal Api documentation.
If you still want to do th is programatically then here's and example:
If you're using node_privacy_by_role, then an example insert would be:
Insert into node_access
(nid,gid,realm,grant_view,grant_update,grant_delete)
values
(<node>,<role_id>,'node_access_byrole_role',<grant_view>,<grant_update>,
<grant_delete>)
With the followign replacements:
<node> The node id that you're protecting - find from node edit screen
<role_id> the role ID for the role your granting access to.
<grant_view> 1 if the role can view, otherwise 0
<grant_update> 1 if the role can update, otherwise 0
<grant_delete> 1 if the role can delete, otherwise 0
-----Original Message-----
From: support-bounces@xxxxxxxxxx [mailto:support-bounces@xxxxxxxxxx] On
Behalf Of VJ
Sent: Thursday, December 29, 2005 9:20 AM
To: support@xxxxxxxxxx
Cc: development@xxxxxxxxxx
Subject: [support] node_access table
How does this table work? If I want to remove comment and update rights
to a specific user (or role), whats the exact SQL query?
Thanks,
V
--
[ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]
|