Drupal: why can't user admin access my module pages?
Posted
by
mmersz
on Stack Overflow
See other posts from Stack Overflow
or by mmersz
Published on 2010-12-28T23:41:07Z
Indexed on
2010/12/29
11:54 UTC
Read the original article
Hit count: 191
I am working on a drupal 6.x module which consists of several page as defined in the .module page. The problem is that when I visit those pages as admin, I get access denied. I thought that admin (user 1) could access anything? Here the code for some of the pages:
function foobar_menu()
{
$items['admin/foobar'] = array(
'title' => 'administer foobar',
'page callback' => 'foobarpage',
);
$items['admin/foobar/baz'] = array(
'title' => 'Do baz',
'page callback' => 'drupal_get_form',
'page arguments' =>array('foobarpage'),
);
So how do I make sure that only admin can see these pages and the rest get a "page does not exists" error?
© Stack Overflow or respective owner