function relation_add_update_7001 in Relation add 7
Implements hook_update_N().
Add endpoint autocomplete menu callback access to the anonymousandauthenticated user roles.
File
- ./
relation_add.install, line 36 - Relation Add install file.
Code
function relation_add_update_7001() {
$rids = db_select('role', 'r')
->fields('r', array(
'rid',
))
->condition('name', array(
'anonymous user',
'authenticated user',
), 'IN')
->execute()
->fetchAllAssoc('rid', 'array');
foreach (array_keys($rids) as $rid) {
user_role_grant_permissions($rid, array(
'relation add endpoint autocomplete access',
));
}
return t('Added endpoint autocomplete menu callback access to the anonymous and authenticated user roles.');
}