function heartbeat_permission in Heartbeat 7
Implements hook_permission().
File
- ./
heartbeat.module, line 222 - Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.
Code
function heartbeat_permission() {
$permissions = array(
'admin heartbeat templates' => array(
'title' => t('Administer heartbeat templates'),
'description' => t('Manage the heartbeat templates.'),
),
'admin heartbeat delete all' => array(
'title' => t('Delete all activity'),
'description' => t('Master permission to delete all activity.'),
),
'admin heartbeat delete own' => array(
'title' => t('Delete own activity'),
'description' => t('Permission for the actor to delete own activity.'),
),
'view heartbeat messages' => array(
'title' => t('View activity'),
'description' => t('Global permission to view heartbeat activity.'),
),
'access heartbeat activity profiles' => array(
'title' => t('Access heartbeat activity profiles'),
'description' => t('Permission to see user profiles or links to the user profile.'),
),
);
foreach (heartbeat_stream_config_load_all(TRUE) as $streamConfig) {
$permissions['view ' . $streamConfig->name . ' stream'] = array(
'title' => t('View activity in ' . $streamConfig->name),
'description' => t('Stream access: ' . $streamConfig->name . '.'),
);
}
return $permissions;
}