diff options
author | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-07 18:01:01 -0300 |
---|---|---|
committer | Patrick Maia <patrickjourdanmaia@gmail.com> | 2014-08-08 13:44:44 -0300 |
commit | bd624bdd14ef63186064b2e39fc422f328b24b26 (patch) | |
tree | 4a1ecee496baaf490354b5f11f222410ecf94379 /web-ui/app/js/features | |
parent | b30c4434e50c4e3ac128cf04ce4935ca6c660037 (diff) |
disables save draft, add tag, reply-section features
Diffstat (limited to 'web-ui/app/js/features')
-rw-r--r-- | web-ui/app/js/features/features.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/web-ui/app/js/features/features.js b/web-ui/app/js/features/features.js new file mode 100644 index 00000000..74efdd07 --- /dev/null +++ b/web-ui/app/js/features/features.js @@ -0,0 +1,18 @@ +define([], function() { + var disabledFeatures; + + function getFeatures() { + disabledFeatures = disabledFeatures || fetchDisabledFeatures(); + return disabledFeatures; + } + + function fetchDisabledFeatures() { + return ['saveDraft', 'createNewTag', 'replySection']; + } + + return { + isEnabled: function(featureName) { + return ! _.contains(getFeatures(), featureName); + } + }; +}); |