Every now and then we come across a situation where a forum needs to be in “read only” mode in order to prevent new posts being made.
However, it is really annoying that read only mode also prevents configuration changes, SSO synchronization and logging in.
It would be great if we had some kind of partial read only mode where only posts and post actions would be read-only.
Right now the only thing I can think of is stripping post permissions from all category security groups but that is a bit too hacky and it requires storing them somewhere else for the time being.
Does anyone have an idea on what the best way to accomplish this would be?
Probably this is plugin territory, but still: what approach would be best?
I used NewPostManager.add_handler, it seems like the :validate_post event only notifies and does not present the opportunity to return a result and deny the post.
For our community, this plugin provides a “Sabbath” mode. The heart behind it is to prompt community members to take what they’ve experienced in our online context and lovingly serve their neighbors in their local communities.
The key components behind what Richard developed are:
The ability to schedule both routine and occasional times when posting is disabled and turned back on. There’s the ability to disable posting for weekends (ongoing) and also for major holidays (occasional).
The capacity to sync this with a custom Global Banner so we don’t confuse participants (“why is the site not working?!”). Rather, we can clearly explain to visitors and members why posting is temporarily disabled.
As for other activity:
Disabling reactions is congruent with the original vision but I suppose could be a checkbox admins could toggle in order to expand the versatility of this site setting
I don’t think this plugin affects any other plugins
New accounts can be created - only posting is disabled
It works beautifully. I’m excited that this capacity might be integrated into the roadmap.
@outofthebox Actually the scheduling is not part of this plugin, that’s the scheduled-readonly plugin which works closely together with the prevent-posting plugin.
I’m so glad to know this, as I’ve been experimenting with the idea of a Sabbath or vacation mode, as I may want us to take time away, especially if I’m running my Discourse site along with a class.
I think I’ll try both plugins, thank you!
EDIT: I’ve just tested this out and got it working on one of my sites, but when I went to edit the plugin to turn it off, it said it was in read-only mode and I couldn’t edit the setting. I tried clicking the “disable read-only mode” in the Admin > Backups but I think the plugin was overriding the setting.
Once the plugin is enabled and is in the read-only time period, is there any way for me to disable it?
EDIT 2: I had to rebuild without the plugin, as it got stuck and enforced read-only mode even after the time had expired. I don’t know if me manually clicking the “disable read-only mode” button caused that. Also, for some reason, the holiday period wasn’t even enabling on another Discourse instance, so I’m left baffled
We recently added a “staff writes only” mode - it’s a readonly mode that only affects non-staff. It allows staff to login, post, change settings, etc, while other users see a site that is effectively in readonly mode.
Is there any chance of implementing ADMIN_WRITES_ONLY_MODE_KEY to also prevent moderation actions?
I have a use case scenario where I put the forum in read only mode, perform backup and then keep the forum online and accessible for viewing while the new vps is being rebuilt from scratch, backup restored and than IP switched to the new server seamlessly without downtime.
Any moderation actions on the old server post backup/read only mode would be lost after the live switch if moderators are exempt from partial readonly mode.
I’m currently using a full readonly mode, but it is cumbersome because it also prevents admin changes using the Web UI.
Just a heads up for anyone testing the scheduled read-only plugin, I put a test case for about 2 minutes and it confused me why it wasn’t turning off—turns out it only checks every 5 minutes.