function taxonomy_permissions_install in Taxonomy Permissions 7
Same name and namespace in other branches
- 8 taxonomy_permissions.install \taxonomy_permissions_install()
File
- ./
taxonomy_permissions.install, line 15 - Install, update and uninstall functions for the taxonomy_permissions module.
Code
function taxonomy_permissions_install() {
$perms = array();
foreach (taxonomy_get_vocabularies() as $vocabulary) {
$perms[] = 'view terms in ' . $vocabulary->machine_name;
}
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, $perms);
user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, $perms);
}