You are here

function oauth_common_perm in OAuth 1.0 6.3

Implementation of hook_perm().

File

./oauth_common.module, line 35

Code

function oauth_common_perm() {
  $permissions = array(
    'oauth authorize any consumers',
    'oauth register any consumers',
    'administer oauth',
    'administer consumers',
  );

  // Add seperate permissions for creating and
  // authorizing consumers in each context.
  foreach (oauth_common_context_list() as $name => $title) {
    $permissions[] = sprintf('oauth register consumers in %s', $name);
    $permissions[] = sprintf('oauth authorize consumers in %s', $name);
  }
  return $permissions;
}