You are here

function nodeaccess_add_type_grant in Nodeaccess 7

Add the grant tab to the specified node type.

Parameters

string $type: The node type we are adding the grant tab for.

3 calls to nodeaccess_add_type_grant()
NodeaccesssGrantTabTestCase::testGrantTabVisbility in tests/nodeaccess_grant.test
Make sure the 'Grant' tab is available from the node view when appropriate. @test
NodeaccesssPublishTestCase::setUp in tests/nodeaccess_publish.test
Enable the nodeaccess module. Add type grant for pages. Rebuild perms.
NodeaccesssRoleTestCase::setUp in tests/nodeaccess_role.test
Enable the nodeaccess module. Add type grant for pages. Rebuild perms.

File

./nodeaccess.module, line 1082
Provide per node access control

Code

function nodeaccess_add_type_grant($type) {
  $grants = variable_get('nodeaccess-types', array());
  $grants[$type] = TRUE;
  nodeaccess_set_type_grants($grants);
}