Context: I’m importing a vBulletin forum to Discourse.
I’d like to configure stuff like CDN, remote backups, etc before letting existing users access the forum content.
I’d prefer not to set the forum as a read-only mode as it will be frustrating for the users to, after a few months, finally see the content again (and updated!) but not to be able to interact with. In this context, if the content is available, then it should be interactable too.
So basically I’d need Discourse to be available for staff, but display a “maintenance” page for other users, even if they are theoretically able to log in, and stillbe able to have my website communicate with services like CDN so I can configure them properly.
AFAIK the simplest way is to make the site login required, turn on must approve users and aim SMTP at something like mailhog. I don’t recall if the importer approves users automatically, if it does you can do something like this in the rails console:
approved_users = AdminUserIndexQuery.new(query: 'approved', stats: false).find_users_query
approved_users.each do |u|
u.approved = false
u.save!
end
And then turn off approval when you’re good to go.
That way you won’t send any messages publicly during the migration, and can see all of the messages that Discourse has generated in case something goes awry.
Unless you choose to migrate passwords, users will be resetting their credentials anyhow.
But hide the login buttons temporarily, as well a replacing the sentence by something like “Under construction. Stay tuned!”
Users who’ll try to log in from /login won’t be able anyway since the password import didn’t work and the emails for non-staff are disabled, so they won’t be able to log in with email or reset their password as well.
I guess this solution can achieve what I need, right?