Skip to content
Snippets Groups Projects
Commit 8872d4cb authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Move kadira to bottom of packages so it loads after rocketchat:lib; Add...

Move kadira to bottom of packages so it loads after rocketchat:lib; Add settings to process.env; Don't accept overrides on public part of settings.son
parent 784c37a9
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,6 @@ konecty:mongo-counter
konecty:multiple-instances-status
konecty:nrr
konecty:user-presence
meteorhacks:kadira
mizzao:autocomplete
mizzao:timesync
momentjs:moment
......@@ -59,3 +58,4 @@ tmeasday:errors
todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
meteorhacks:kadira
\ No newline at end of file
......@@ -3,27 +3,26 @@
Settings.find().observe
added: (record) ->
Meteor.settings ?= {}
Meteor.settings[record._id] = record
Meteor.settings[record._id] = record.value
if process?
process.env ?= {}
process.env[record._id] = record.value
# configLoginServices settings
# loadEnvConfigs settings
# configCDN settings
# configKadira settings
changed: (record) ->
Meteor.settings?[record._id] = record
Meteor.settings?[record._id] = record.value
if process?
process.env[record._id] = record.value
# __meteor_runtime_config__?.PUBLIC_SETTINGS = Meteor.settings?.public
# configLoginServices settings
# loadEnvConfigs settings
# configCDN settings
# configKadira settings
removed: (record) ->
delete Meteor.settings?[record._id]
delete process?.env?[record._id]
# loadEnvConfigs = (settings) ->
# if settings.ENV?
# for key, value of settings.ENV
# process.env[key] = value
# configLoginServices = (settings) ->
# settings?['login-services']?.forEach (config) ->
......@@ -35,7 +34,3 @@ Settings.find().observe
# configCDN = (settings) ->
# if settings.CDN_PREFIX?
# WebAppInternals.setBundledJsCssPrefix settings.CDN_PREFIX
# configKadira = (settings) ->
# if settings.kadira?
# Kadira.connect(settings.kadira.appId, settings.kadira.appSecret)
\ No newline at end of file
......@@ -13,9 +13,7 @@ RocketChat.settings.add = (_id, value, options = {}) ->
if Meteor.settings?[_id]?
value = Meteor.settings[_id]
if Meteor.settings?.public?[_id]?
value = Meteor.settings.public[_id]
updateSettings =
i18nLabel: options.i18nLabel or _id
......
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