menu permissions

Events happening in the community are now at Drupal community events on www.drupal.org.
govinda_roul's picture

what are the values that can be passed to access arguments in drupal ?

Let's say I have a custom module as "mycustommenu" and have a hook menu and hook perm as
function mycustommenu_perm {
return array('hi','hello','welcome','bye');
}

function mycustommenu_menu() {
global $user;
$items['mycustommenu'] = array(
'title' => 'custom menu',
'page callback' => 'mycustommenu_welcome',
'page arguments' => array($user->name),
'access callback' => 'user_access',
'access arguments' => array('welcome'),
'type' => MENU_NORMAL_ITEM,
);

and the callback function is

function mycustommenu_welcome($uname='')
{

Read more
lpalgarvio's picture

Comparison of Menu delegation/Administer Menu permission modules

module comparison:

  • Menu Permissions - allows giving roles the ability to administer certain menu groups (and by result their menu entries). it's simple as it only adds a new permission per menu group. requires giving the "Administer Menus" permission, which means users can rename the menu group.
  • Menu Admin per Menu - allows giving roles the ability to administer certain menu groups (and by result their menu entries). it's simple as it only adds a new permission per menu group. IMO, it's a "better version" of the previous, because unlike the previous, it DOES NOT require giving the "Administer Menus" permission.
  • Delegate Menu Administration - allows giving roles the ability to administer certain menu groups and their menu entries. it's complex because it allows giving permissions by menu group and menu entry. unrecommended unless you require that particular feature.
Read more
Subscribe with RSS Syndicate content