Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
Can someone see anything wrong with this hook_menu() and hook_permission() code? I am able to see the permissions in the admin menu, admin/people/permissions. I allow access tolos user front for authenticated users and save the settings. Then, I clear all caches and try to access los/register. I am getting You are not authorized to access this page. when I try with either administrative or authenticated users. I have cleared the cache, logged in and out and even closed the browser and restarted it refreshing ever step of the way.
/** * Implements hook_permission */ function los_permission() { return array( 'los user front' => array( 'title' => t('LOS User Frontend'), 'description' => t('Access to LOS user frontend.'), ), 'los user back' => array( 'title' => t('LOS User Backend'), 'description' => t('Access to LOS user backend'), ), 'los admin back' => array( 'title' => t('LOS Administration Backend'), 'description' => t('Access to LOS administration backend.'), ), ); } /** * Implements hook_menu */ function los_menu() { $items = array(); $items['los/register'] = array( 'title' => 'LOS Register', 'description' => 'Large order system registration page', 'page callback' => 'drupal_get_form', 'page arguments' => array('los_register'), 'access arguments' => array('los user front'), ); //... more $items here ... return $items; }