diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-11-13 03:15:33 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-11-27 23:17:45 +0100 |
commit | abec097da19a56a73270a3e9b30198c07b1210ea (patch) | |
tree | e2f5ba40c61139dda4547c084562b8656df8f06a /web/react/utils/utils.jsx | |
parent | 11942ef955c67d0b616cfcaa670becea0af624db (diff) | |
download | chat-abec097da19a56a73270a3e9b30198c07b1210ea.tar.gz chat-abec097da19a56a73270a3e9b30198c07b1210ea.tar.bz2 chat-abec097da19a56a73270a3e9b30198c07b1210ea.zip |
PLT-1125: allow to toggle features in frontend
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 9b2f7e057..432cb05e0 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1221,3 +1221,7 @@ export function getPostTerm(post) { return postTerm; } + +export function featureToggle(feature) { + return PreferenceStore.getPreference(Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, 'feature_enabled_' + feature, {value: 'false'}).value === 'true'; +} |