Skip to content
Snippets Groups Projects
Commit 1973c98b authored by Oliver Jägle's avatar Oliver Jägle Committed by Rodrigo Nascimento
Browse files

Env override initial setting (#6163)

* check for overridden environment variable

fixes #6161

* Environment variable overriding a setting

Fixes #6161
parent 68ab8ad0
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,9 @@ RocketChat.settings._sorter = {}
RocketChat.settings.add = (_id, value, options = {}) ->
# console.log '[functions] RocketChat.settings.add -> '.green, 'arguments:', arguments
if not _id or not value?
return false
if not _id or
not value? and not process?.env?['OVERWRITE_SETTING_' + _id]?
return false
RocketChat.settings._sorter[options.group] ?= 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment