You are here

function hosting_site_access in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_site_access()

Implementation of hook_access

File

site/hosting_site.module, line 314

Code

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

    // we rely on hosting_client_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;
  }
}