You are here

function support_client_access_callback in Support Ticketing System 7

Entity access callback for support clients.

1 string reference to 'support_client_access_callback'
support_entity_info in ./support.module
Implements hook_entity_info().

File

./support.module, line 65
support.module

Code

function support_client_access_callback($op, $type = NULL, $account = NULL) {
  if (user_access('administer support', $account)) {
    return TRUE;
  }
  switch ($op) {
    case 'create':

      // Administrator only
      return FALSE;
    case 'update':

      // Administrator only
      return FALSE;
    case 'delete':

      // Administrator only
      return FALSE;
    case 'view':
      return user_access('can select client', $account);
    default:
      return FALSE;
  }
}