function support_permission in Support Ticketing System 7
Implementation of hook_perm().
File
- ./
support.module, line 758 - support.module
Code
function support_permission() {
$perm = array(
'administer support' => array(
'title' => t('Administer support'),
'restrict access' => TRUE,
'description' => t('Grant access to all support module features.'),
),
'can administer state' => array(
'title' => t('Can administer state'),
'description' => t('Can set ticket to any state, ignoring normal ticket workflows.'),
),
'can suppress notification' => array(
'title' => t('Can suppress notification'),
'description' => t('Can prevent notification email from being sent.'),
),
'can subscribe other users to notifications' => array(
'title' => t('Can subscribe other users to notifications'),
'description' => t('Can subscribe and unsubscribe other users to email notifications.'),
),
'download mail via support/fetch' => array(
'title' => t('Download mail via support/fetch'),
'description' => t('Can cause support module to download email by visiting the support/fetch path.'),
),
'view other users tickets' => array(
'title' => t('View other users tickets'),
'description' => t('Can view tickets other than those assigned to or created by self.'),
),
'can select state' => array(
'title' => t('Can select state'),
'description' => t('Can change ticket state property.'),
),
'can select priority' => array(
'title' => t('Can select priority'),
'description' => t('Can change ticket priority property.'),
),
'can select client' => array(
'title' => t('Can select client'),
'description' => t('Can change ticket client property.'),
),
'can assign tickets to self' => array(
'title' => t('Can assign tickets to self'),
'description' => t('Can change ticket assignment to self.'),
),
'can assign tickets to any user' => array(
'title' => t('Can assign tickets to any user'),
'description' => t('Can change ticket assignment to any valid user.'),
),
'move ticket' => array(
'title' => t('Move ticket'),
),
);
$result = db_query('SELECT name FROM {support_client} WHERE status = :status', array(
':status' => 1,
));
foreach ($result as $client) {
$key = 'access ' . check_plain($client->name) . ' tickets';
$perm[$key] = array(
'title' => t('Access !client tickets', array(
'!client' => check_plain($client->name),
)),
);
}
return $perm;
}