You are here

function connector_permission in Connector 7

Implements hook_permission().

File

./connector.module, line 137
Connector module

Code

function connector_permission() {
  $perms = array(
    'access connections tab' => array(
      'title' => t('Access connections tab'),
      'description' => t('Access the tab with connections to administer connections to external sites for a user.'),
    ),
    'sync local profile with connections' => array(
      'title' => t('Sync local profile with connections'),
      'description' => t('Sync a local profile with a connection.'),
    ),
  );
  $connectors = _connector_get_connectors();
  foreach ($connectors as $connector) {
    $perms['connect with ' . $connector['name']] = array(
      'title' => t('Connect with @title', array(
        '@title' => $connector['title'],
      )),
      'description' => t('Allow user to make a connection with #title to login, register on this site or do stuff on #title in name of the user.', array(
        '#title' => $connector['title'],
      )),
    );
  }
  return $perms;
}