[support] Multiple roles access a site while in maintenance mode
Jamie Holly
hovercrafter at earthlink.net
Fri Aug 29 18:49:58 UTC 2014
Two tricks I have done in the past. First is a very simple one. Give
them the administer site configuration permission. That's the quick and
easy, but in my experience, it has lead to confusion, especially among
users new to Drupal setting up content (they now got a bunch more menus
and can get overwhelmed)
The second is a little more involved, requiring some coding that can be
done in your settings.php, but is still only about a 5-10 minute hack/fix
- First, create a special "login" link using a URL variable or even a
custom path that you can check with $_GET['q']. Check if that condition
is met in your settings.php, then set a custom cookie and redirect back
to the front page.
- Add another check in your settings.php, checking for that cookie. If
it's set, then set $conf['site_offline'] = 0;
There is one final option, that is easier, but only applies to if this
is a new site that has never had regular users check in. Simple check
for the session cookie in settings.php, then set the
$conf['site_offline'] to 0 if it exists. This works since users can
still hit the login screen when the site is in offline mode (in case the
admin needs to get in) and remain logged in when the site comes up.
Jamie Holly
http://hollyit.net
On 8/29/2014 2:32 PM, Drupal wrote:
> Hi,
> The site I’m working on is pretty much done but I still can’t make it public until website editors do some content changes and spelling corrections. I don’t want to give them the admin access so I was wondering how to make their role (editor) bypass the maintenance mode - without any changes in the code or me writing a new module.
>
> Thanks
More information about the support
mailing list