function computing_permission in Drupal Computing 7.2
Same name and namespace in other branches
- 7 computing.module \computing_permission()
Implements hook_permission().
File
- ./
computing.module, line 76
Code
function computing_permission() {
$permissions = array(
'administer computing module' => array(
'title' => t('Administer computing module'),
'description' => t('Administer computing module on the module level.'),
),
'administer computing records' => array(
'title' => t('Administer computing records'),
'description' => t('View, create, edit and delete all computing records as Drupal entities.'),
),
);
$permissions['access computing services endpoints'] = array(
'title' => t('Access computing services endpoints'),
'description' => t('Allow access computing module services endpoints'),
);
//Generate permissions per model
/*foreach (computing_get_applications() as $app) {
$app_name = check_plain($app->application);
$permissions += array(
"create $app_name computing entity" => array(
'title' => t('%app_name: Create new computing entity', array('%app_name' => $app->label)),
),
"edit any $app_name computing entity" => array(
'title' => t('%app_name: Edit any computing entity', array('%app_name' => $app->label)),
),
"view any $app_name computing entity" => array(
'title' => t('%app_name: View any computing entity', array('%app_name' => $app->label)),
),
);
}*/
return $permissions;
}