civiform icon indicating copy to clipboard operation
civiform copied to clipboard

Disallow setting ADMIN_WRITEABLE vars in deployment config files

Open rockycodes opened this issue 2 years ago • 0 comments

Values for variables that are marked as ADMIN_WRITEABLE in env-var-docs.json are saved in the db and should be managed via the admin settings panel and not set in deployment configs. Setting an ADMIN_WRITEABLE var in the deployment config could result in confusion when that value is not what shows up on the site.

To prevent this, we should add a check for ADMIN_WRITEABLE vars to prevent them from being set in deployment configs. We should also add an override that allows ADMIN_WRITEABLE vars to be set in the config in special cases. Special cases include:

  • Our AWS staging environment which is wiped every night, erasing the values saved in the db
  • When a CE wants to do the initial deployment with values other than the default values.

rockycodes avatar Feb 15 '24 21:02 rockycodes