function support_access_clients in Support Ticketing System 6
Same name and namespace in other branches
- 7 support.module \support_access_clients()
Custom permissions function.
6 calls to support_access_clients()
- support_access in ./
support.module - Implementation of hook_access().
- support_reference_autocomplete in support_reference/
support_reference.module - @todo: should we allow cross-client references?
- support_reference_block in support_reference/
support_reference.module - Implementation of hook_perm().
- support_reference_block_form_submit in support_reference/
support_reference.module - support_search in ./
support.module - Implementation of hook _search.
2 string references to 'support_access_clients'
- support_menu in ./
support.module - Implementation of hook_menu().
- support_pm_menu in support_pm/
support_pm.module - Implementation of hook_menu(). TODO: Include date in 'view' and 'edit' tabs
File
- ./
support.module, line 572 - support.module
Code
function support_access_clients($client = NULL, $account = NULL) {
if (is_object($client)) {
if (is_object($account)) {
return user_access('administer support', $account) || user_access("access {$client->name} tickets", $account);
}
else {
if ($client->clid == SUPPORT_ALL_CLIENTS) {
if (_support_access_tickets() > 1) {
return TRUE;
}
else {
return FALSE;
}
}
return user_access('administer support') || user_access("access {$client->name} tickets");
}
}
else {
return _support_access_tickets();
}
}