function hosting_package_access in Hostmaster (Aegir) 6
Implementation of hook_access().
File
- modules/
hosting/ package/ hosting_package.module, line 96
Code
function hosting_package_access($op, $node, $account) {
if (hosting_feature('client')) {
// we rely on hosting_node_grants() instead of global configuration
return NULL;
}
switch ($op) {
case 'create':
return user_access('create package', $account);
break;
case 'view':
return user_access('view package', $account);
break;
case 'update':
return user_access('edit package', $account);
break;
case 'delete':
return user_access('delete package', $account);
break;
default:
break;
}
}