You are here

function relation_add_install in Relation add 7

Implements hook_install().

File

./relation_add.install, line 11
Relation Add install file.

Code

function relation_add_install() {
  $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',
    ));
  }
}