logo       

RE: node_access table: msg#00165

Subject: RE: node_access table
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/ ]



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe