You are here

function gauth_user_permission in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_user/gauth_user.module \gauth_user_permission()

Implements hook_permission().

File

gauth_user/gauth_user.module, line 96
Google Auth Api for drupal.

Code

function gauth_user_permission() {
  $accounts = gauth_user_services_load();

  // Generate standard services account permissions for all services.
  $perms = array();
  foreach ($accounts as $type) {
    $perms += array(
      "authenticate {$type->id} gauth services account" => array(
        'title' => t('%type_name: Authenticate for gauth services account', array(
          '%type_name' => $type->name,
        )),
      ),
    );
  }
  return $perms;
}