Download & Extend

Admin switch to make site read-only

Project:Drupal core
Version:5.12
Component:base system
Category:feature request
Priority:normal
Assigned:Eric Scouten
Status:closed (won't fix)

Issue Summary

Much of the core work I do on my sites is done on a laptop instead of the production server. During the times when I'm making major upgrades, I'd like to lock the production server into "read-only" mode so that new content (comments, stories, etc.) don't get lost while I'm changing things on my laptop. (At the end of such maintenance windows, I typically upload a new snapshot of the database over top of the existing one.) I can sort of accomplish this now by taking away permissions in the access control panel, but that gets real tedious real quickly, especially when I'd like to give those permissions back as soon as the maintenance is done.

What I'd really like is a single master switch that makes the entire site. All modules that write to the database would read this switch and disable features as appropriate.

Before I embark on this work, I'd like to know if the community would be receptive to such a patch.

Comments

#1

I think this would be a great feature, I have the same problem as you. At the moment I have a parallel testing server that I work on before applying but this is not the best solution. AFAIK other CMS have this option so this would be a great feature/module for drupal!
I'm not very good at programming so I can't really offer a hand at the moment :-(

#2

Status:active» closed (won't fix)

Can be done as a contrib module.

#3

4.7 has the ability to take the whole site offline except for the admin. If you want to ensure no changes during an upgrade, that's how to do it. (Even users browsing around can cause database changes, depending on your modules.)

#4

Version:x.y.z» 5.12

I have a master site and a replicated (copy of master) site.

Suppose I *want* users to be able to browse the replicated site (I don't want the site offline), but I don't want them to be able to create nodes on the replicated site.

Because it's replicated, the access permissions will come from the master site, which *does* allow them to make changes. The replicated site is basically a backup that I want them to be able to log into with their usual accounts, but not create data. Putting replicated database in read-only mode doesn't work because they can't even log int.

Any suggestions for how I might create a module that could supply such an on/off switch?

nobody click here