function node_registration_permission in Node registration 7
Implements hook_permission().
File
- ./
node_registration.module, line 515
Code
function node_registration_permission() {
$permissions = array(
'administer node registration' => array(
'title' => t('Administer registration'),
'description' => t('Perform administration tasks for Node registrations.'),
'restrict access' => TRUE,
),
'other node registration' => array(
'title' => t('Register for others'),
'description' => t('Create Node registrations with other user as subject.'),
),
);
foreach (_node_registration_node_types() as $type => $name) {
$params = array(
'%type' => $name,
);
$permissions += array(
'add ' . $type . ' node registration' => array(
'title' => t('%type: add registration', $params),
),
'view ' . $type . ' node registration' => array(
'title' => t('%type: view registration', $params),
),
'view own ' . $type . ' node registration' => array(
'title' => t('%type: view own registration', $params),
),
'edit own ' . $type . ' node registration' => array(
'title' => t('%type: edit own registration', $params),
),
'cancel own ' . $type . ' node registration' => array(
'title' => t('%type: cancel own registration', $params),
),
'delete own ' . $type . ' node registration' => array(
'title' => t('%type: delete own registration', $params),
),
);
}
return $permissions;
}