view-only users group when off-line

Need help with the Administration of your Joomla! 4.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
jerry258
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Jun 01, 2022 9:44 pm

view-only users group when off-line

Post by jerry258 » Fri Jun 24, 2022 8:16 pm

I am trying to set up a view-only users group for when my website is off line. Been thru several online tutorials but can't find how get view-only. Using J4, on Cassopeia
Thanks for your help

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 7823
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: view-only users group when off-line

Post by AMurray » Sat Jun 25, 2022 12:16 am

Offline mode is only generally for administrators. Normal registered users wouldn't be logging in there.

Several ways I think could achieve the above without much effort (but the site remains online in these examples):

1. Protect the root folder (where joomla is installed) with htaccess/htpasswd. You would set up a username and password for each (or just one generic one for all). Normal users would not have the details and therefore would be blocked from viewing the front-end.
2. Disable the users you don't want having access in User Manager. There's a "block" command. I assume that would prevent them logging on. You would select the users applicable, and choose the "block" command - this simply disables the user, I assume from logging on.

3. Create a separate user group for the specific users (a duplicate of "Registered"). In the User Manager, you can perform bulk-actions such as moving the users to different user groups.

Alternatives: there are extensions where you can build a custom Offline page (with bells and whistles like countdown timers etc but some may also have the ability to override the Offline page with a secret code appended to the URL - see https://extensions.joomla.org/tags/offline/ and are available for J4.
Regards - A Murray

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 7823
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: view-only users group when off-line

Post by AMurray » Sat Jun 25, 2022 12:38 am

Perhaps disregard the above....I think I kind of went off track with my answers.

Joomla 4 indeed allows you to permit other types of users (or those in specified user groups) to access the site if it is in offline mode.

As an example - go to Global Configuration then Permissions, then click the relevant user group. There you can see you can set any group to "offline access - allowed".

To set up a new user group, I would simply make a new group, set it as a Child of "Registered" so that the "Registered" permissions are inherited by the Child user group.

You can set specific permissions to read only ("Not Allowed") concerning the Create or Edit functions - but normally a "Registered" user can't do any content editing (other than their own profile, or other relevant functions that are associated with their account).

Move the relevant users to this Child group ( you can use the bulk-action function in User Manager to do this).

I hope this may help, rather than my original answer.
Regards - A Murray

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41702
Joined: Sat Apr 05, 2008 9:58 pm

Re: view-only users group when off-line

Post by Webdongle » Sat Jun 25, 2022 2:43 am

AMurray wrote:
Sat Jun 25, 2022 12:16 am
Offline mode is only generally for administrators. Normal registered users wouldn't be logging in there.
...
Not completely accurate

(From another thread)
Webdongle wrote:
Fri Jun 24, 2022 8:24 pm
...
The 'Offline Access' setting in Global config determines the user group that the users need to be in to login to see the front end. Managers, Admin and Super users by default are allowed to log in to see the front end when the site is offline. But other user groups can be set to 'Offline Access' Allowed.
Addendum
If a Permission is 'Not Allowed (Inherited)' it can be 'Allowed' further down the Permissions chain e.g. Category Permissions. But if set 'Denied' then it can't. Same applies for any part of the permission 's chain.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 7823
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: view-only users group when off-line

Post by AMurray » Sat Jun 25, 2022 2:57 am

In circumstances with the default settings, what I said was accurate. Registered users can't under default settings log in to "offline mode" sites unless the settings are changed. The OP wants users to login via Offline mode as "read only" so is not saying he wants site admins of any sort logging in.

When I said "administrators" I implied the Manager, Administrator, Super user.
Regards - A Murray

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41702
Joined: Sat Apr 05, 2008 9:58 pm

Re: view-only users group when off-line

Post by Webdongle » Sat Jun 25, 2022 9:38 am

AMurray wrote:
Sat Jun 25, 2022 2:57 am
In circumstances with the default settings, what I said was accurate. Registered users can't under default settings log in to "offline mode" sites unless the settings are changed. ...
You were accurate but not completely. I just gave a fuller picture.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

jerry258
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Jun 01, 2022 9:44 pm

Re: view-only users group when off-line

Post by jerry258 » Mon Jun 27, 2022 3:14 pm

Thanks All! some good ideas to try.
Jerry


Post Reply

Return to “Administration Joomla! 4.x”