You are here

function acl_node_add_acl in ACL 8

Same name and namespace in other branches
  1. 5 acl.module \acl_node_add_acl()
  2. 6 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.

1 call to acl_node_add_acl()
AclTest::testNodeAclAddRemoveFromNode in src/Tests/AclTest.php
Includes acl_node_add_acl, acl_node_remove_acl, acl_node_clear_acls

File

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

Code

function acl_node_add_acl($nid, $acl_id, $view, $update, $delete, $priority = 0) {
  acl_node_add_acl_record([
    'acl_id' => $acl_id,
    'nid' => $nid,
    'grant_view' => (int) $view,
    'grant_update' => (int) $update,
    'grant_delete' => (int) $delete,
    'priority' => $priority,
  ]);
}