You are here

function acl_node_add_acl in ACL 6

Same name and namespace in other branches
  1. 8 acl.module \acl_node_add_acl()
  2. 5 acl.module \acl_node_add_acl()
  3. 7 acl.module \acl_node_add_acl()

Provide access control to a node based upon an ACL id.

File

./acl.module, line 80
An API module providing by-user access control lists.

Code

function acl_node_add_acl($nid, $acl_id, $view, $update, $delete, $priority = 0) {
  db_query("DELETE FROM {acl_node} WHERE acl_id = %d AND nid = %d", $acl_id, $nid);
  db_query("INSERT INTO {acl_node} (acl_id, nid, grant_view, grant_update, grant_delete, priority) VALUES (%d, %d, %d, %d, %d, %d)", $acl_id, $nid, $view, $update, $delete, $priority);
}