I created this little Joomla! plugin when I had a request to lock some pages on a client site with a simple and straightforward approach. That meant not using the Joomla! default User permission system, but a simple page protection with a password. They previously were using some .htaccess complex redirections which with time have started to mess up the other essential .htaccess rules, like SEO & SEF settings.
What is it doing?
It is a simple plugin that hooks on Joomla!’s onAfterRoute
system event. It checks if the user has already been authenticated by checking the session. If not, a Restricted page is shown with a form where a user can enter the required password. If correct, the password hash will be stored in the user’s session and will keep the page open. Up until the session ends, which is connected to the Joomla!’s global config setting: Session Lifetime, which by default is set to 15 minutes.
Backend plugin options
The plugin has quite a lot of options by which you can accommodate the look and feel of the Restricted page itself. As well as options for choosing which menu items (pages) you would like to lock, as well as an option to set a password.
It has to be noted here, that as the Joomla! is designed, one menu Itemid can be connected to multiple pages (ie: Category Blog menu item). So you have to be careful since in some cases you can simply lock multiple pages at once.
The best use case for it would be to have one menu item ( of type Single article ) per one article setup. That way you will be restricting correct single pages.
Can you use it?
Of course. It is a free and Open Source Joomla! plugin, hosted on GitHub. You can use it on as many sites as you like, as well as change it, as long as you abide by the GPL v.2.0 license that it is licensed with.
I hope you’ll will find it useful.