Set user message for "Permission Denied"

Permalink
I have been looking through the dashboard options, the documentation and these forums, but perhaps I do not know the correct terms to search for....

I would like to have an "access denied" type of page pop up when a user tries to click onto a page that they do not have permission to view. Currently, a login page appears. My website consists of static pages, and therefore has no need to ever allow user logins. As the administrator, I am the only user, the rest of the site is visible and functional to the general public. Sometimes, I will lock permission on certain pages as I am developing them, and I don't want them to be available to anyone else. This is where I would like the "access denied" message to appear.

For the most part, this should not be a problem, as I will remove links to those pages until I am ready for them to be published; however, if anyone else has linked to those pages, or bookmarked them, I would rather have the "denied" message appear than a "login" screen.

Is this a feature that is as simple as ticking or unticking a box, or is what I'm looking for not quite so simple?

 
hutman replied on at Permalink Reply
hutman
I think if you copy the /concrete/controllers/page_forbidden.php to /controllers/page_forbidden.php and grab the view function from concrete/core/controllers/single_pages/page_forbidden.php and comment out
parent::view();
$u = new User();
$logged = $u->isLoggedIn();
if(!$logged && FORBIDDEN_SHOW_LOGIN) { //if they are not logged in, and we show guests the login...
   $this->render('/login');
}
it should do what you are looking for.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.