Take the 2-minute tour ×
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It's 100% free, no registration required.

I know there are many ways to do this, however when I think deeply, a global disable of the site might be difficult.

What I want is when a user goes to the website, they are redirected to the login page no matter where they are. I would prefer not to need special settings in every menu item or other area of the page.

Is there a simple way to do this? Or a super awesome plugin that does this? My searches so far have been in vain. However that just might be my choice of keywords in JED/Google.

share|improve this question
    
put your site offline in the global configuration? –  web-tiki May 2 at 18:06
    
That would work somewhat, but that feature is not meant for this, so I would have to mess with user groups and such, so since I am using strict OAuth for login (no users) user groups are not easy to add into it. –  Jordan Ramstad May 2 at 18:41

4 Answers 4

up vote 8 down vote accepted

Would one of these work?

Members Only (From the JED)

Keep prying eyes away from part or your whole website, while they stay anonymous. Optionally you may allow visitors to directly register to your website with or without requiring for an invitation code.

registeredOnly (From the JED)

registeredOnly plugin restrict access to Joomla site to registered users only.

When a guest tries to access any Joomla content, they are redirected to the login page.

share|improve this answer
1  
Registered only seems to work like a charm :) –  Jordan Ramstad May 2 at 20:49

1) Use Joomla!'s Built-In ACL

I recommend defaulting your visitors to a login page and using Joomla!'s built-in ACL using Registered users.

Set a Top-Level Menu item with permissions to Registered users - and then each Menu item on that tree will be only visible and available to Registered users.

There is an excellent tutorial on ACL in the Joomla! Docs.

However, files and documents can still be downloaded by non-registered users (i.e. if they have the direct link).

In this case, you will have to use a 3rd party extension, if you wish to protect those docs, such as Akeeba Release Systems or SobiPro.

2) Password Protected Directories

The 'simplest' way to protect your site is to Password Protect your directory via .htaccess/

It's inelegant, but if you use cPanel, for example, go to Security -> Password Protected Directories and use the wizard to name directories, add or remove users and assign those users to the Password Protected Directory - you can give each user a unique name and password.

It's inelegant, but simple and used quite often in practice - however, I reiterate, it's probably best use ACL and if protecting docs from download, a 3rd party extension.

If you keep your files/docs under the Password Protected directory, then those will be protected as well - requiring a user with permissions trying to access that directory to login first.

share|improve this answer

I had a client request to make an extranet for them using Joomla, which had to be 'locked down' as strictly as possible. I did this by setting the site to Offline in Global Configuration, then edited the ACL to give 1 custom user group I created the Offline Access permission.

I notice in the comments you mention you're using OAuth for login - some extensions that assist with this can be configured to automatically add users to a user group, so you could then use this functionality to add them to the group configured as per the above instructions.

I then overrode the offline.php file in my template to make it seem more like an extranet-style login page, rather than the default 'This site is offline' page.

share|improve this answer

You could set the permission of all menu links to registered, forcing the user to log in.

share|improve this answer
1  
Because no menu item other then login will be shown without the user being logged in, I would prefer to avoid the extra step if possible, as I said in the question. –  Jordan Ramstad May 2 at 20:17
1  
You can default to the login page when members hit your site address. They login - the menu items appear. Where is the extra-step? ACL is set-up beautifully for this. –  NivF007 May 2 at 23:43
    
@NivF007 The extra step is having to set the menu access to "Registered" every time you make a menu item. The simplest solution would be to be able to set a default menu access level, instead of it just defaulting to "Public". If you could set it to default to "Registered" no extension would be needed. –  David Fritsch May 3 at 3:50
1  
@DavidFritsch Setting one parameter on the creation of a menu link isn't exactly hard work. It's not like you add new menu links every day. –  Adam B May 3 at 17:52
1  
@AdamB That would work! And then set the menu module to start at level two. If you wanted just one layer. An odd solution in my mind but should be possible –  David Fritsch May 3 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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