You are here

function hosting_server_access in Hostmaster (Aegir) 6

Implementation of hook_access()

File

modules/hosting/server/hosting_server.module, line 80

Code

function hosting_server_access($op, $node, $account) {
  if (!hosting_feature('server')) {
    return FALSE;
  }
  switch ($op) {
    case 'create':
      return user_access('create server', $account);
    case 'view':
      return user_access('view server', $account);
    case 'update':
      return user_access('edit server', $account);
    case 'delete':
      return user_access('delete server', $account);
  }
}