You are here

function restws_permission in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.module \restws_permission()

Implements hook_permission().

File

./restws.module, line 485
RESTful web services module.

Code

function restws_permission() {
  $permissions = array();

  // Create service access permissions per resource type.
  foreach (restws_get_resource_info() as $type => $info) {
    $permissions['access resource ' . $type] = array(
      'title' => t('Access the resource %resource', array(
        '%resource' => $type,
      )),
    );
  }
  return $permissions;
}