If you want to restrict access to certain pages, or all pages of a certain type, on your Drupal website, I recommend the Content Access module. Unfortunately, the Content Access module fails to hide the menu item of a restricted page.
This means that your restricted page will still show up in your site's menu and visitors will be able to navigate to the page where they will be greeted with a rather unfriendly access denied error message. According to this bug report, it's down to a deficiency in Drupal itself and not something that's going to be fixed in the Content Access module. Happily, there is a solution that I will discuss below.
Of course, this behaviour might be exactly what you're after. If this is the case, I'd suggest using the LoginToboggan module, which (amongst many other useful features) will allow you to display a login form on the access denied page.
However if your menu is a mixture of links to restricted pages and links to views, you'll find that the Views module correctly hides the menu item of a view to users who do not have permission to access it. So you're left with half a menu, consisting only of links to your restricted pages.
In this case you can use the Remove Non-viewable Menu Items module to hide the menu items of your restricted pages. There's no configuration required, so just install it and watch your restricted menu items disappear.
Drew at 16:01 on 10-Aug-2009
How can you set up a custom access denied on Blocks? For example I have a block on the homepage with download links. I want only authenticated users to access these links?
Let me know if anyone has any ideas Heres the URL of the page I am referring to.