How to put app into maintenance mode but still allow admins/moderatos to login and use the site?

Viewed 3363

I'd like to put my app into maintenance mode but still have admins / moderators be able to log in and use the site.

Two reasons:

  1. I'm making some changes within the app that are best applied using the in-app interface rather than the console.

  2. Moderators don't have access to the console, but can definitely help with the maintenance tasks we have ahead of us.

How would you recommend this be done? I have been experimenting with setting an environment variable ADMIN_MODE and changing all the permissions when it is true, but that seems pretty cludgy and slow.

I'm using CanCan and Devise, for what it's worth, but I'm definitely open to any suggestions.

3 Answers
Related