For Your Eyes Only is the twelfth spy film in the James Bond series. I made reference to the title for the simple reason that I wanted to hide the web site (intranet) built using Joomla against unauthorized people.
My idea was to allow access only to people (employees) who know only they username and password, no more, no extra passwords or blocks of IP addresses etc.
First I tried using the Global Configuration in the main Control Panel switching Site Offline. This setting shows when the site is offline. However, after a moment of euphoria, I remembered that only Administrators will be able to see the site when Site Offline is set to Yes. So this way falls in my case. If plan “A” doesn’t work, go to plan “B’, and so on.
Manage your templates
Second attempt had already been successful. I try to become like the master adapter, the coyote or new James Bond with Daniel Craig. I used all senses alert for whatever might be to use. The ability to improvise and adopt allows me (and you) to make use of every opportunity, extension in my case. So, I took a very interesting and useful component….
Joomla can only assign templates to any page that has a “Menu Item” linked to it. MetaTemplate (from metamodpro.com) completely removes this restriction, allowing you to assign a different template to any page, at any time, for whoever, from wherever you want! I could switch template for individual users, guests, logged-in users, or any user group. MetaTemplate has fewer form controls than Pro version (e.g. it doesn’t have a form control for users or user groups) — the rest you have to code yourself in PHP. However, for my needs in a completely free version enough for me.
So I made very simple template with only one module position, I put there a BNR Login module, which has a simple improvement on the Joomla core login module. Adds options to turn on/off the password reminder, username reminder, and create account links. Now after some time I had two templates one for only login page, and main for rest of my users. After that I use MetaTemplate to create a simple PHP rule:
if ( MM_NOT_LOGGED_IN ) return "start_template"; if ( MM_LOGGED_IN ) return "penguinmail";
And It works.
If my concept was to hard for you, I hope not, you can use: registeredOnly plugin restrict access to Joomla site to registered users only. After enabled, when a guest tries to access any Joomla content, they will be redirected to the login page.
By they way, if you want to protect several contentitems with a password you can use a free ContentPassword plugin, also. To see the Content, the visitors need to know the password.
Joomla! 1.6 is more powerful than ever
Without a doubt, you can also use the Joomla! 1.6, because we have now new tool, Advanced ACL (Access Control System). As an administrator, you can now easily restrict Joomla! users from content, here is a quick list of some of the capabilities ACL provides:
- Unlimited user groups A user can be assigned to multiple groups
- Unlimited access levels
- Any combination of groups can be assigned to any access level
- Access permissions can be set at multiple levels in hierarchy: Site, Component, Category, Object
- Permissions can be inherited from parent Groups and parent Categories for faster user management.