[development] How do I restrict the custom urls to a specific role?

John Mitchell mitchelljj98 at gmail.com
Thu Mar 10 21:06:29 UTC 2011


How do I restrict the custom urls (listed below) to a specific role?

//hook_menu()

function custom_subscription_menu() {
  $items = array();

  $items['admin/store/free_subscription'] = array(
    'title' => 'free_subscription_form',
    'description' => 'free_subscription_form',
    'page callback' => 'free_subscription_form',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  $items['admin/store/process_free_subscription'] = array(
    'title' => 'process_free_subscription',
    'description' => 'process_free_subscription',
    'page callback' => 'process_free_subscription',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  return $items;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110310/14f7f815/attachment.html 


More information about the development mailing list