AnsweredAssumed Answered

Easily enable and disable mainteance mode for Sugar Cloud

Question asked by Kevin Louie Employee on Feb 14, 2020

In Sugar 7.9, Sugar introduced a maintenance mode config setting.  This setting restricts logins to only admins, allowing you to make changes to the instance while preventing regular users potentially entering new data. However since it is a line that needs to be placed in the config_override.php file you would need to file a support case to add and remove that line if you were hosted in Sugar Cloud.

 

I created a package attached below that works in Sugar Cloud. This package adds the maintenance mode line to the config_override.php file when the package is installed, and deletes the line when the package is uninstalled.

 

Requirements:

  • Admin user
  • Sugar 9.0+

Steps to enable package:

  1. Login as an admin to your instance
  2. Navigate to Admin > Module Loader
  3. Upload the attached package
  4. Install the package
  5. Once installed, regular users will see an error message saying "SugarCRM is in maintenance mode. Only admins can login. Please contact your administrator for details."

Steps to disable the package:

  1. Login as an admin to your instance
  2. Navigate to Admin > Module Loader
  3. Find the "Maintenance mode on/off package" and click Uninstall
  4. Once uninstalled, regular users should be able to login again.

The use of the package provided below is up to your discretion, and I provide it as-is, feel free to take it and develop upon it as you see fit.

Attachments

Outcomes