function taxonomy_access_global_defaults in Taxonomy Access Control 7
Returns an array of global default grants for all roles.
Parameters
bool $reset: (optional) Whether to recalculate the cached values. Defaults to FALSE.
Return value
array An array of global defaults for each role.
Related topics
3 calls to taxonomy_access_global_defaults()
- taxonomy_access_delete_role_grants in ./
taxonomy_access.module - Deletes module configurations for the given role IDs.
- taxonomy_access_update_7002 in ./
taxonomy_access.install - Add vocabulary defaults for all configured vocabularies.
- _taxonomy_access_node_access_records in ./
taxonomy_access.module - Calculates node access grants by role for the given node ID.
File
- ./
taxonomy_access.module, line 1371 - Allows administrators to specify access control for taxonomy categories.
Code
function taxonomy_access_global_defaults($reset = FALSE) {
$global_grants =& drupal_static(__FUNCTION__, array());
if (empty($global_grants) || $reset) {
$global_grants = db_query('SELECT rid, grant_view, grant_update, grant_delete, grant_create,
grant_list
FROM {taxonomy_access_default}
WHERE vid = :vid', array(
':vid' => TAXONOMY_ACCESS_GLOBAL_DEFAULT,
))
->fetchAllAssoc('rid');
}
return $global_grants;
}