You are here

function hosting_menu_access in Hostmaster (Aegir) 6

Menu access callback for creating a node provided by a Hosting feature.

Parameters

$type: The node type that the user wants to create.

$feature: The machine name of the host feature that should be additionally checked to see if it's enabled.

Return value

TRUE if the user can access, FALSE otherwise.

1 string reference to 'hosting_menu_access'
hosting_menu_alter in modules/hosting/hosting.module
Implementation of hook_menu_alter().

File

modules/hosting/hosting.module, line 155
Hosting module.

Code

function hosting_menu_access($type, $feature) {
  global $user;
  return ($user->uid == 1 || user_access('create ' . $type)) && hosting_feature($feature) != HOSTING_FEATURE_DISABLED;
}