Commit Graph

38557 Commits

Author SHA1 Message Date
Robin Ward
549c552402 FIX: Remove username_lower from admin serializer
The property is already computed on the front end and this ends up
overwriting it.
2020-07-21 14:00:43 -04:00
Robin Ward
fa74f28a51 REFACTOR: Remove Discourse.SiteSettings from initializers 2020-07-21 13:51:28 -04:00
Robin Ward
f5adf6d183 REFACTOR: Remove Discourse.SiteSettings from reply adapter 2020-07-21 13:51:28 -04:00
Robin Ward
9aab81f304 REFACTOR: Remove Discourse.SiteSettings from components 2020-07-21 13:51:28 -04:00
Robin Ward
f83c383177 REFACTOR: Remove Discourse.SiteSettings from some controllers 2020-07-21 13:51:28 -04:00
Robin Ward
17bccbb52f REFACTOR: Remove Discourse.SiteSettings from search-result widget 2020-07-21 13:51:28 -04:00
Robin Ward
ac0d5b1d3f REFACTOR: Remove Discourse.SiteSettings from nav-item 2020-07-21 13:51:28 -04:00
Robin Ward
9dd6367d81 REFACTOR: Remove Discourse.SiteSettings from PostCooked widget 2020-07-21 13:51:28 -04:00
Robin Ward
531793e98f REFACTOR: Remove Discourse.SiteSettings from topic tracking state 2020-07-21 13:51:28 -04:00
Robin Ward
f6c40075e5 REFACTOR: Remove Discourse.SiteSettings from post model 2020-07-21 13:51:28 -04:00
Robin Ward
21ea4d1238 REFACTOR: Remove Discourse.SiteSettings from application controller 2020-07-21 13:51:28 -04:00
Robin Ward
ccb36f81c4 REFACTOR: Remove Discourse.SiteSettings from topic model 2020-07-21 13:51:28 -04:00
David Taylor
ec4024fe6d
FIX: Keep by_users check in S3 inventory
Partial revert of 8515d8fa - the by_users check is ensuring we don't raise errors for fixtures
2020-07-21 17:19:56 +01:00
Vinoth Kannan
ef37460c93 FIX: delete synonyms in topics if target tag is already added.
Currently, while adding a synonym tag if both target and synonym tags are already available in a topic then it's returning an error.
2020-07-21 21:02:01 +05:30
David Taylor
8515d8fae5
FIX: Improve S3 inventory logic
Previously we considered 'upload rows without etags' to be exempt from the check. This is bad, because older/migrated sites might not have etags on all their uploads. We should consider rows without etags to be broken, since we can't check them against the inventory.

This also removes the `by_users` scope. We need all uploads to be working, even ones created by the system user.
2020-07-21 15:55:53 +01:00
Guo Xiang Tan
74ddbc91b0
DEV: Update rails_failover to 0.5.4
Pulls in

- FIX: Undefined method on nil class error in forking servers.
2020-07-21 16:01:53 +08:00
Guo Xiang Tan
d38dd68d05
DEV: Fix lint. 2020-07-21 15:55:03 +08:00
Guo Xiang Tan
bb8f1ce8b1
DEV: Consolidate Unicorn error backtraces when logstash is enabled. 2020-07-21 15:35:41 +08:00
Guo Xiang Tan
23778f4bfd
DEV: Avoid logging Redis cannot connect error during failover.
Reduce amount of noise in our logs.
2020-07-21 14:53:46 +08:00
Joffrey JAFFEUX
de5245631b
FIX: gives emojis a width/height to prevent lazy loading warning (#10277) 2020-07-21 08:50:56 +02:00
Joffrey JAFFEUX
936a40adcf
linting (#10276) 2020-07-21 08:39:14 +02:00
Guo Xiang Tan
df66a559c9
DEV: Pause Sidekiq before readonly mode during PG failover. 2020-07-21 13:51:37 +08:00
Guo Xiang Tan
94fced2133
FIX: Handle PG readonly mode in Auth::DefaultCurrentUserProvider.
Avoid writing to the DB when PG is in readonly mode.
2020-07-21 13:44:05 +08:00
Guo Xiang Tan
031a6616a3
DEV: Allow writes to PG even if Redis is readonly mode.
Previously, I thought it was better to drop the site into reading mode
when Redis has failed over to the replica but it created more errors
while Redis is in readonly mode since ActiveRecord would prevent us from
writing to PG even though PG is up.
2020-07-21 12:34:07 +08:00
Guo Xiang Tan
cebd8da299
FIX: Don't raise error when adding to cache fails in readonly mode. 2020-07-21 12:20:23 +08:00
Kris
aa00a6f077 UX: Improve alignment and consistency on full page search 2020-07-21 00:04:07 -04:00
Penar Musaraj
98e6a6a895
UX: Fix quote sharing button spacing 2020-07-20 21:09:13 -04:00
Martin Brennan
41b43a2a25
FEATURE: Add "delete on owner reply" bookmark functionality (#10231)
This adds an option to "delete on owner reply" to bookmarks. If you select this option in the modal, then reply to the topic the bookmark is in, the bookmark will be deleted on reply.

This PR also changes the checkboxes for these additional bookmark options to an Integer column in the DB with a combobox to select the option you want.

The use cases are:

* Sometimes I will bookmark the topics to read it later. In this case we definitely don’t need to keep the bookmark after I replied to it.
* Sometimes I will read the topic in mobile and I will prefer to reply in PC later. Or I may have to do some research before reply. So I will bookmark it for reply later.
2020-07-21 10:00:39 +10:00
Blake Erickson
949c8923a4 DEV: Clean up some extra wording
Remove "Allowed" label because it isn't needed now that we have
relocated the checkbox.

Follow up to: 30af3f24ef
2020-07-20 16:53:10 -06:00
Blake Erickson
30af3f24ef DEV: Relocate enable allowed PMs checkbox
To avoid confusion move the enable allowed PMs checkbox to the same page
that you add your allowed users.

Follow up to: 690f17bcbe
2020-07-20 16:23:42 -06:00
Blake Erickson
690f17bcbe
FEATURE: Allow List for PMs (#10270)
* FEATURE: Allow List for PMs

This feature adds a new user setting that is disabled by default that
allows them to specify a list of users that are allowed to send them
private messages. This way they don't have to maintain a large list of
users they don't want to here from and instead just list the people they
know they do want. Staff will still always be able to send messages to
the user.

* Update PR based on feedback
2020-07-20 15:23:49 -06:00
Roman Rizzi
2abfd30d22
FIX: Trigger before upload event after saving and before uploading it, so we are sure that the upload is valid. (#10269) 2020-07-20 17:59:37 -03:00
Roman Rizzi
98eb7a3f00
FIX: Users should be able to delete their own queued posts (#10265) 2020-07-20 17:21:20 -03:00
jbrw
7ab5658462
FEATURE: Allow group moderators to add/remove staff notes (#10252)
* FEATURE: Allow group moderators to add/remove staff notes
2020-07-20 15:53:47 -04:00
Robin Ward
44cfa25d7d FIX: Focus tests are unreliable in qunit
I doubt they'll regress so let's remove them for now.
2020-07-20 15:44:29 -04:00
Robin Ward
5e5973cabe FIX: Our test build of highlight.js was broken
Some definitions rely on others, in particular the c/cpp/c-like ones,
and we were appending the bundle of all files in the folder.

Instead for testing I've limited us to just three definitions. This has
the benefit of being a lot smaller to download/parse in test mode too.
2020-07-20 15:34:24 -04:00
Robin Ward
a78b256e8b FIX: Raw jQuery usage in tests 2020-07-20 15:13:49 -04:00
Robin Ward
71b0400501 FIX: deleted is a computed property of Topic 2020-07-20 14:43:37 -04:00
Robin Ward
e625aeeb0d FIX: Report was overwriting a CP 2020-07-20 14:42:16 -04:00
Robin Ward
a0c6f1b2b4 FIX: category-drop tests were broken and overwriting CPs 2020-07-20 14:39:42 -04:00
Robin Ward
ac9fa4a056 FIX: Overwritten computed properties 2020-07-20 14:14:52 -04:00
Robin Ward
537cfb7ef6 FIX: Missing favicon in test 2020-07-20 13:25:26 -04:00
dependabot-preview[bot]
6623794dab Build(deps-dev): Bump test-prof from 0.11.3 to 0.12.0
Bumps [test-prof](https://github.com/palkan/test-prof) from 0.11.3 to 0.12.0.
- [Release notes](https://github.com/palkan/test-prof/releases)
- [Changelog](https://github.com/palkan/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palkan/test-prof/compare/v0.11.3...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-20 12:12:55 -04:00
dependabot-preview[bot]
874c8ffd0f Build(deps): Bump rubocop-ast from 0.1.0 to 0.2.0
Bumps [rubocop-ast](https://github.com/rubocop-hq/rubocop-ast) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/rubocop-hq/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-ast/compare/v0.1.0...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-20 12:01:40 -04:00
Penar Musaraj
0f6405745a
DEV: re-enable test skipped in 7dce4bfd
Leak in lib:sharing tests was the likely cause of failure.
2020-07-20 09:55:30 -04:00
Daniel Waterworth
0b800d307f SECURITY: Bound the amount of work that embed#topics can do
This commit adds a hidden site setting that limits the maximum number of
topics that can be fetched at once via the embed controller.
2020-07-20 13:25:34 +01:00
Jarek Radosz
8f2f9e6afa
DEV: Remove the <details> polyfill (#10260)
Per the linked site (http://mths.be/details) and https://caniuse.com/#feat=details the <details> element is supported since Chrome 12/Safari 6/Firefox 49/Edge 79. IE 11 doesn't handle them, but we dropped the support for that browser.
2020-07-20 13:18:00 +02:00
David Taylor
5f3dfce4eb
FIX: Listing topics with muted mixed-case tags (#10268)
When visiting a tag page directly, we should display all topics, even if that tag is muted. This was not working for mixed-case tags.
2020-07-20 11:01:29 +01:00
Daniel Waterworth
9313706649 DEV: Enable preserve_email_structure_when_styling by default
In 1bd8a075, a hidden site setting was added that causes Email::Styles
to treat its input as a complete document in all cases.

This commit enables that setting by default.

Some tests were removed that were broken by this change. They tested the
behaviour of applying email styles to empty strings. They weren't useful
because:

 * Sending empty email is not something we ever intend to do,
 * They were testing incidental behaviour - there are lots of
   valid ways to process the empty string,
 * Their intent wasn't clear from their descriptions,
2020-07-20 10:21:32 +01:00
Guo Xiang Tan
383537a2fa
DEV: Force ActiveRecord reading role on Redis failover take 2. 2020-07-20 16:11:20 +08:00