You are here

function hosting_platform_access in Hosting 6.2

Same name and namespace in other branches
  1. 5 platform/hosting_platform.module \hosting_platform_access()

Implementation of hook_access().

File

platform/hosting_platform.module, line 125
Platform node type definition.

Code

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