I need to restrict a View-generated page to authorized users only. (D7.9, Views 3)

I generally want to hide the Drupal's built-in user login block, but have the login form appear when a guest tries to access that page. I have been messing around with Fancy Login (which is supposed to appear whenever there is a need to authenticate), and also with roles and permissions, esp. with "Views: Bypass views access control". Somehow I cannot get the desired result - the page is either fully accessible, or an Access denied page comes up.

Anyone been through a similar challenge?


2 Answers 2


Just configure your "Default 403 (access denied) page" to "user/login". It's under "configuration / system / site information"


I would tackle it with Panels.

Make a panel page. Place your view on it, and set the visibility of the content to be for authenticated user. Place the login form on it, and then set the visibility for this to be for anonymous users only.

You may also need Login Toboggan or Login Destination to redirect users back to the same page after they log in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.