You are here

function hosting_site_access in Hostmaster (Aegir) 6

Implementation of hook_access

File

modules/hosting/site/hosting_site.module, line 271

Code

function hosting_site_access($op, $node, $account) {
  if ($op != 'create' && hosting_feature('client')) {

    // we rely on hosting_node_grants() instead of global configuration
    return NULL;
  }
  switch ($op) {
    case 'create':
      return user_access('create site', $account);
      break;
    case 'update':
      return user_access('edit site', $account);
      break;
    case 'delete':
      return user_access('delete site', $account);
      break;
    case 'view':
      return user_access('view site', $account);
      break;
  }
}