Commit Graph

133 Commits

Author SHA1 Message Date
Sam b1e68390f4 FIX: false overrides should be permitted via ENV 2016-02-13 17:49:26 +11:00
Guo Xiang Tan f2c64a3580 FIX: Client settings were not being published. 2016-02-11 17:53:30 +08:00
Sam Saffron d0dd517f27 FEATURE: blank global settings should not shadow
Due to https://github.com/docker/docker/issues/9298 it is a huge pain
to remove ENV vars when composing images, allow us to simply treat "blank"
as a ENV var that is not being shadowed. In general we always supply a
value to ENV vars we are shadowing.
2016-02-10 11:54:40 +11:00
Arpit Jalan 97e4f7f6d3 Enums that are used in tables need to be stable 2016-01-08 20:43:11 +05:30
Robin Ward 5e93140f85 FEATURE: Can override any translation via an admin interface 2015-11-27 11:35:19 -05:00
Sam 1061a9ed06 PERF: introduce full cache for site json when anon 2015-09-28 16:50:24 +10:00
Régis Hanol 31e8309f05 FIX: ensure we never have a string when an enum is Fixnum - Take 2 2015-09-09 14:34:44 +02:00
Régis Hanol 9a999bfe84 FIX: ensure we never have a string when an enum is Fixnum 2015-09-09 12:59:49 +02:00
Robin Ward da25abfcc9 Merge pull request #3714 from riking/live-settings
FEATURE: Live-update site settings
2015-09-01 12:03:30 -04:00
Robin Ward b41b176bc6 Support for `value_list` in site settings 2015-09-01 11:54:16 -04:00
Kane York d4c68f2096 FEATURE: Live-update site settings 2015-08-31 10:40:50 -07:00
Régis Hanol 4ba89eec27 FIX: removing a default category wasn't working 2015-08-26 22:40:16 +02:00
Sam 1c6250bff8 FIX: if an enum is Fixnum do not allow strings to live in it 2015-08-26 16:39:09 +10:00
Régis Hanol bef80633b1 FEATURE: global admin override of most of the user preferences 2015-08-21 20:39:21 +02:00
Kane York 2363897a25 FEATURE: Arbitrary validations for site settings 2015-08-20 18:27:19 -07:00
Sam fd63d89753 FEATURE: simpler definition of enum types 2015-08-07 11:41:48 +10:00
Arpit Jalan e9a81064e7 Revert "FIX: fixnum type site setting can't be more than 20000"
This reverts commit 636cc66e1f.
2015-07-13 22:53:44 +05:30
Arpit Jalan 636cc66e1f FIX: fixnum type site setting can't be more than 20000 2015-07-13 18:58:45 +05:30
Robin Ward 7b6d6b76eb FEATURE: Multiple embeddable hosts
- Also refactors two site settings components into one, with tests
2015-06-09 13:25:43 -04:00
Sam 803feefd54 MessageBus handles readonly redis now, no need to wrap it 2015-05-04 12:21:00 +10:00
Robin Ward 5b3f99aa50 Don't blow up if Redis switches to READONLY 2015-04-24 14:37:16 -04:00
Arpit Jalan 2ee033caa5 FIX: validate integer site setting 2015-04-23 18:15:14 +05:30
Sam a82530012a FEATURE: Allow selection of highlight js languages
PERF: stop loading highlight js on load

To get latest highlight js run bin/rake highlightjs:update
2015-03-13 16:18:59 +11:00
Robin Ward 84b84a9d7c Support for `url_list` site setting. 2015-03-03 16:19:29 -05:00
Sam 0742f340f9 FEATURE: allow for a localized error when a regex fails in site settings
FEATURE: apply string validation to list site settings (so we get regex)
2015-02-27 11:45:56 +11:00
Sam 5f8e604abc remove an allocation 2015-02-12 15:07:17 +11:00
Sam 276fd702e8 missed a send which caused code to break 2015-02-12 15:01:14 +11:00
Sam ab3d4471fe PERF: remove eval cause it is costing lots of memory
see: http://tenderlovemaking.com/2013/03/03/dynamic_method_definitions.html

isolated via memory profiler gem.
2015-02-12 14:44:40 +11:00
Robin Ward 0da022a1ba FIX: Make sure to observe shadowed settings when refreshing 2015-02-09 17:28:55 -05:00
Robin Ward 5d6f6c4887 Revert "FIX: `refresh` should work with shadowed globals"
This reverts commit 226f4b5bd9.
2015-02-09 17:08:52 -05:00
Robin Ward 226f4b5bd9 FIX: `refresh` should work with shadowed globals 2015-02-09 16:52:21 -05:00
Sam 63404b16bb FIX: on upgrade via discourse docker client json not updating 2015-02-09 17:58:56 +11:00
Régis Hanol f7d2fc0524 FEATURE: 'reply by email address' validator
Prevent infinite email loophole when the 'reply_by_email_address' site setting is the same as the 'notification_email'.
2015-02-06 12:08:37 +01:00
Robin Ward aacf2e6f20 Can add `shadowed_by_global` to a site setting to override
If a site setting has `shadowed_by_global: true` then, if
a `GlobalSetting` exists with the same name then that value
will be used instead.  Additionally, the setting will be hidden.

This is useful in a multisite environment for private settings
such as API keys. You want to set it globally, yet not display
the key to customers.
2015-02-03 16:49:22 -05:00
Sam 844467015d FEATURE: allow simple selection for category badge styles
clean up category badge styling
2015-01-29 17:49:14 +11:00
Régis Hanol e6e7948617 FEATURE: support for emoji sets
Added following emoji sets
  - Apple/International
  - Emoji One (default)
  - Android/Google
  - Twitter

FIX: translations from plugins weren't properly merged with default translations
FEATURE: new 'site_setting_changed' event
2014-12-11 17:08:47 +01:00
Sam c98d0a8eb6 Revert "Revert "PERF: use distributed cache for site text and category slugs""
This reverts commit 65e7cd1d1d.
2014-11-12 10:01:41 +11:00
Sam 65e7cd1d1d Revert "PERF: use distributed cache for site text and category slugs"
This reverts commit a97f2eee05.
2014-11-12 10:01:07 +11:00
Sam a97f2eee05 PERF: use distributed cache for site text and category slugs 2014-11-12 09:44:44 +11:00
Sam 4e85fc9dae PERF: cache all site_text in memory 2014-11-11 16:28:59 +11:00
Robin Ward 33de48dc0c FIX: Float site settings were marked as overridden, reset didn't work. 2014-08-20 15:24:56 -04:00
Sam 8737ffb272 Merge pull request #2658 from akshaymohite/optimization-fixes
Not initializing variable for looping if unused in loop
2014-08-18 14:42:52 +10:00
Robin Ward 26ca197be9 Adds Site settings to configure post:like ratio thresholds 2014-08-15 12:02:29 -04:00
Akshay 6301a43d57 Not initializing variable for looping if unused in loop 2014-08-15 03:24:55 +05:30
Arpit Jalan 3b2a5f6894 FIX: filter whitelist domain name 2014-07-24 22:02:10 +05:30
Neil Lalonde 4c237f5bf5 In site_settings.yml, change list: true to type: list 2014-06-18 11:15:40 -04:00
Neil Lalonde 3eb65885d1 Add validation of string site settings with regex, and min and max lengths 2014-06-18 11:15:40 -04:00
Neil Lalonde ba65aa3f6c Add a way to validate min and max value of an integer site setting 2014-06-12 18:04:37 -04:00
Neil Lalonde c61462662b Add ability to run validation on site settings. notification_email and other email address settings are now validated. 2014-06-09 16:59:20 -04:00
Neil Lalonde e114e47533 FIX: enum site settings UI was broken 2014-06-05 16:42:37 -04:00
Benjamin Kampmann 572ee3b94d add site_setting choices
- add site_setting choices lists to list entries
 - allows for handy autocompletion using the new select2.js UI
 - automatically merges plugin choices into existing list, allowing for easy extension
2014-06-01 16:37:51 +02:00
riking 6779bec58c Add UI for list site settings 2014-04-08 14:17:55 -07:00
Sam d71f62a9f9 Merge pull request #2180 from tomciopp/master
More idiomatic approach to finding drafts
2014-04-08 16:46:24 +10:00
Sam 9aec32688b BUGFIX: when RTT is short likes may not appear to work
BUGFIX: site settings db provider not triggering updates
  at the correct point
2014-03-31 12:34:13 +11:00
Sam 8fc2549873 Stop using global vars where not needed
Simplify local process site setting provider
Stop setting up methods over and over
Centralize cache clearing
2014-03-31 12:34:13 +11:00
Sam f3cc7360e0 BUGFIX: Correct after_fork semantics
After fork SiteSettings was not getting a new process id,
causing site settings not to refresh properly in unicorn

This code also centralizes the logic
2014-03-31 12:34:13 +11:00
Thomas Cioppettini 38882eb1a7 Remove threequals from ruby files 2014-03-26 12:20:41 -07:00
riking ccd3e635d2 Refresh the site after updating certain site settings 2014-03-06 20:24:23 -08:00
Neil Lalonde 74f1c553e3 FIX: 1868 Security: Dangerous Send 2014-01-27 13:05:51 -05:00
Neil Lalonde fc180ccd71 Site settings: move category into the opts hash so that it's compatibale with existing plugins 2013-11-15 14:32:33 -05:00
Neil Lalonde 1e37abc310 Add site setting category support 2013-11-14 16:02:13 -05:00
Sam 666264879c change it so all topics MUST include a category, we store a special uncategorized category to compensate
this cleans up a bunch of internals and removes some settings
2013-10-24 12:08:02 +11:00
Sam ad2ed5fe51 rate limits for topics and posts on first day
max_topics_in_first_day and max_replies_in_first_day
2013-10-10 10:32:03 +11:00
Sam 1b9079ed20 centralize logic so mockers stop mocking me 2013-09-03 17:58:56 +10:00
Sam 46d5314ec4 Improve Rails4 performance by 20%, before the median on the page is 53ms, after it is 44ms 2013-09-03 17:58:56 +10:00
Neil Lalonde 6e79197519 Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
Sam ea932b74e7 values is a much more consistent name than all_values ... we use {}.values not {}.all_values
also fixes random ordering of tests failure in site settings
2013-06-23 15:07:49 +10:00
Sam 0b94c3c456 fix all sorts of issues with random spec order
SiteSetting no longer persisted across tests
2013-06-23 13:35:25 +10:00
Sam 384d743e7b refactoring of site settings 2013-06-13 12:41:27 +10:00
Neil Lalonde 5ff7e570ac Add support for enum site settings that render as a dropdown; use a dropdown for default_locale 2013-06-11 11:40:14 -04:00
Robin Ward 72b4f41254 Can change TOS content via site content editor 2013-04-05 15:21:55 -04:00
Sam a2cca2540e some minimal site settings diags
fix issue where days_visited was totally out of sync
2013-04-05 17:47:54 +11:00
Karan Misra 5dfb04e4b3 Convert a lot of :a => b to a: b and bring peace to the world 2013-03-25 05:07:36 +05:30
Robin Ward 9858beb6af Missed reference to `type` 2013-03-01 17:33:23 -05:00
Robin Ward d78a2b2b91 Removed unused `type` parameter in site settings. Remove hardcoded date reference in en.yml 2013-03-01 17:27:59 -05:00
Robin Ward 9a2588c46d Update SiteSettingExtension to use new Enum class 2013-03-01 17:21:13 -05:00
Robin Ward d2596c3c4c Remove unusued site_settings, show checkbox in UI for boolean values, remove restrict_access
boolean to avoid locking yourself out by setting access_password to empty string. Minor
UI tweaks.
2013-03-01 14:27:41 -05:00
nverba 2ca81e8afa fixed SiteSettings without defaults Type of Null 2013-02-28 00:24:43 +00:00
nverba c6e5e3acd2 Quick fix for Boolean SiteSettings
Boolean SiteSettings are saved as 't' or 'f' on create!, but are being saved as 1 or 0 after update. This quick fix maintains consistency, allowing boolean values to be updated and saved.
2013-02-27 16:19:09 +00:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward c4ad927024 Site Settings was deleting the wrong cache object 2013-02-07 16:11:30 -05:00
Aaron Chambers 1c29b040c5 A tiny typo fix. It all adds up... 2013-02-07 00:46:57 +00:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00