On Saturday 23 September 2006 13:41, Martin Tomes wrote:
I have defined a page type for pages which should be hidden from anonymous users by writing my own module (an edited copy of page.module) and have set permissions so that only users in specific roles can read those pages. My problem is that if I add that page to a menu that menu entry is shown to anonymous users and I would like it to be hidden from them (they get permission denied on clicking on the menu entry) and only shown to logged in users with view permission. Is there any way to achieve this?
-- Martin Tomes.
Do you have something like this as part of your menu array?:
'access' => user_access('access special page type'),
There are many examples in the core modules in hook_menu functions.