You are here

function hosting_platform_access in Hostmaster (Aegir) 6

Implementation of hook_access().

File

modules/hosting/platform/hosting_platform.module, line 106
Platform node type definition.

Code

function hosting_platform_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 platform', $account);
      break;
    case 'update':
      return user_access('edit platform', $account);
      break;
  }
}