This plugin is an extension for the RainLab.User & the KurtJensen.Passage plugin. This extension adds the possibility to skip the maintenance page for frontend user by authentification.
Hint: This plugin does not have any settings or UI.
Requirements
This Plugin for OctoberCMS requires 2 Plugins:
This Plugin requires an active maintenance page:
- For example: maintenace.html (Enable and select this page in
Settings - Maintenance mode
)
The following plugins are required
User
Front-end user management.
User
Front-end user management.
Passage Permission and Roles System
Fast, Efficient permissions and roles system for your site pages and resources.
Passage Permission and Roles System
Fast, Efficient permissions and roles system for your site pages and resources.
First off install the required plugins & setup a maintenance page, please. After you done this, you are able to install this plugin.
There are two ways to give frontend user access to skip the maintenance page:
Via Group
- Navigate in Backend to
Users - User Groups
- Create a new group called
Skip Maintenance
(individual) with the Codeskip-maintenance
(important) - Navigate in Backend to
Users
- Select or create a new user
- Add this user to the Group
Skip Maintenance
- Login with this user in the frontend
Via Passage Key
- Navigate in Backend to
Users - Passage Keys
- Create a new passage key called
skip-maintenance
(important) - Navigate in Backend to
Users - User Variances
- Create a new variance
- Select a user you want to give access to skip the maintenance page, the passage key
skip-maintenance
, set the check onGrant
and click create - Login with this user in the frontend
Hint: This plugin does not have any settings or UI.
Example, Inspiration & Troubleshooting
Example
You see an example by using the account component by User Plugin below.
maintenance.htm
title = "Maintenance" url = "/maintenance" layout = "web" is_hidden = 0 [account] redirect = "home" == <div class="container"> <h1>Maintenance</h1> <p class="text-muted">Currently we are installing system updates or just place new content to our website.<br />We ll be back soon.</p> <div class="well"> {% if user %} <p><strong>Hello{% if user.name %} {{ user.name }}{% endif %}!</strong></p> <p> {% if inGroup('skip-maintenance') or can('skip-maintenance') %} <a href="{{ '/'|app }}">See website</a> | {% endif %} <a class="text-danger" data-request="onLogout" data-request-data="redirect: '/good-bye'">Sign out</a> </p> {% else %} {% component 'account' %} {% endif %} </div> </div>
Working perfect with Code login
You could also use the Code login Plugin to give the users a better login experience.
maintenance.htm
title = "Maintenance" url = "/maintenance" layout = "web" is_hidden = 0 [session] [codeLogin] redirect = "home" visible = 0 button = "enter" == <div class="container"> <h1>Maintenance</h1> <p class="text-muted">Currently we are installing system updates or just place new content to our website.<br />We ll be back soon.</p> <div class="well"> {% if user %} <p><strong>Hello{% if user.name %} {{ user.name }}{% endif %}!</strong></p> <p> {% if inGroup('skip-maintenance') or can('skip-maintenance') %} <a href="{{ '/'|app }}">See website</a> | {% endif %} <a class="text-danger" data-request="onLogout" data-request-data="redirect: '/good-bye'">Sign out</a> </p> {% else %} {% component 'codeLogin' %} {% endif %} </div> </div>
Cache troubleshooting
Issue: You are logged in and added the user to the group skip-maintenance
or the user variance, but still see the maintenance page?
Fix: Try to clear the browser cache and OctoberCMS Cache via Clear file cache. Also check the URL you entered. If the url is f.e. "/maintenance" you will see the maintenance page even if you are logged in.
-
This plugin has not been reviewed yet.
-
1.0.1 |
First version of Skip Maintenance Nov 01, 2018 |
---|