I was tracing down an "access denied" error on node/add/platform. See this thread: http://drupal.org/node/1130992#comment-5456712
I discovered that the error occurs when I place this module in my hostmaster-6.x-1.4/sites/MYSITE/modules/ directory and flush the menu cache. It seems that I do not even need to enable the module. Perhaps this module is conflicting with hostmaster namespace in some way? Moving the module out of the directory and flushing menu cache again corrects the issue.
I discovered the issue by tracing here in Aegir's hosting.module. I just added the print $feature and saw "hosting_profile" as being checked for access by the function. I believe a hosting_platform access check is being 'intercepted' by hosting_profile's check appearing on the same page. This is all with hosting_profile disabled (and menu cache flushed after disabling). If I place the module in the directory structure and rebuild menus again, the problem re-appears.
<?
/**
* Menu access callback for creating a node provided by a Hosting feature.
*
* @param $type
* The node type that the user wants to create.
* @param $feature
* The machine name of the host feature that should be additionally checked to
* see if it's enabled.
* @return
* TRUE if the user can access, FALSE otherwise.
*/
function hosting_menu_access($type, $feature) {
global $user;
print $feature;
return (($user->uid == 1) || user_access('create ' . $type)) && (hosting_feature($feature) != HOSTING_FEATURE_DISABLED);
}
?>
Comments
Comment #1
jason.fisher commentedI have also posted an issue with Hostmaster: http://drupal.org/node/1130992#comment-5456964
Comment #2
ergonlogicFixed in http://drupalcode.org/project/hosting_profile_roles.git/commit/f3e665829...