Commit Graph

44967 Commits

Author SHA1 Message Date
94cfe98ee4 FEATURE: Validate setting combination between exif strip and img opt (#16662)
Admins won't be able to disable strip_image_metadata if they don't
disable composer_media_optimization_image_enabled first since the later
will strip the same metadata on client during upload, making disabling
the former have no effect.

Bug report at https://meta.discourse.org/t/-/223350
2022-05-05 15:13:17 -03:00
4b92175d4e UX: remove horizontal scoll from narrow screens (#16657) 2022-05-05 11:34:01 -04:00
81580e559c FIX: prevents double user_badge_granted event (#16654)
This bug was causing double events to be fired as :user_badge_granted is already called when a `user_badge` is created. More over the signature of the block in the UserBadge code is `badge_id, user_id` not `badge, user_id`.
2022-05-05 15:09:41 +02:00
8c8b646a59 FIX: Prevent admin theme settings from blowing up (#16653) 2022-05-05 20:20:59 +08:00
47d64b7a08 DEV: Remove last instance of {{with}} helper (#16651) 2022-05-05 06:16:34 -05:00
87b970cd22 UX: Ensure #main-outlet-wrapper takes full width. (#16650)
For some reason, we're seeing inconsistency between production and
development environment where the computed width of #main-outlet-wrapper
is not taking the full width of the grid column in production.

Follow-up to b35cf7cc0c5845924b57399f418d7f5e58887a65.
2022-05-05 16:34:40 +08:00
62cbb766cd FIX: Validate post's polls as acting user (#16638)
It used to validate the post from the perspective of the user who
created the post. That did not work well when an admin attempted to
add a poll to a post created by a user who cannot create posts because
it said the user cannot create polls.

The problem was that it used post.user for the validation process
instead of post.acting_user.
2022-05-05 09:54:10 +03:00
b35cf7cc0c DEV: First desktop design interface pass at experimental sidebar take 2. (#16647) 2022-05-05 14:35:08 +08:00
aa5d90a554 Revert "DEV: First desktop design interface pass at experimental sidebar (#16590)" (#16646)
This reverts commit 36dcf80aff944500c2cdd183613af466efe35591.
2022-05-05 11:56:24 +08:00
0328757ffb FIX: Topic view breaks with topic timer to publish to restricted category. (#16385)
When a user views a topic that contains a topic timer to publish to a
restricted category, an error occurs on the client side because the user
does not have access to information about the category.

This commit fixes it such that the topic timer is not shown to the user
if the user does not have access to the category.
2022-05-05 11:21:01 +08:00
36dcf80aff DEV: First desktop design interface pass at experimental sidebar (#16590)
Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2022-05-05 11:19:46 +08:00
48481dd6ed DEV: Remove ignored columns (#16645)
Bookmark columns deleted in b22450c7a8d378b32291743ca602cbc477dea106
TopicTimer columns deleted in d098f51ad3a3649d34717fa6567489998709ba6c
Upload columns deleted in ef90575b918467e0417c5b5d72c22f12a8550b43
2022-05-05 12:22:17 +10:00
9b2b0cad7c DEV: Bump aws gems (#16632)
It's been 7-10 months since the last upgrade.
2022-05-05 09:54:29 +08:00
3f0e767106 DEV: Use FakeLogger in RequestTracker specs (#16640)
`TestLogger` was responsible for some flaky specs runs:

```
Error during failsafe response: undefined method `debug' for #<TestLogger:0x0000556c4b942cf0 @warnings=1>
Did you mean?  debugger
```

This commit also cleans up other uses of `FakeLogger`
2022-05-05 09:53:54 +08:00
749e496a2c DEV: Minor fixes to json schema editor styling (#16634) 2022-05-05 09:52:58 +08:00
fb1a3a1dbb DEV: Drop TrackingLogger for FakeLogger (#16642) 2022-05-05 09:50:43 +08:00
8442a07c13 DEV: Compatibility with TruffleRuby (#16641) 2022-05-05 09:50:02 +08:00
80d2888222 DEV: add new plugin outlets (#16643) 2022-05-05 09:49:27 +08:00
8271828948 FIX: Users with unicode usernames unable to load more topics in activity (#16627)
This was due to a server side bug when unicode usernames have been
enabled. We were double encoding the unicode username in the URL
resulting in a invalid URL.
2022-05-05 09:48:22 +08:00
aa343d506f Build(deps): Bump nokogiri from 1.13.4 to 1.13.5 (#16644)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.4 to 1.13.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.4...v1.13.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-05 00:27:30 +02:00
45dbbbadba DEV: Add discourse-gamification to the official plugins (#16639) 2022-05-04 21:06:06 +02:00
63f239d0b2 FIX: Add email to admin user list when show_emails is enabled (#16636)
Fixes a regression on be519d2 where this case wasn't accounted for.

Reported at https://meta.discourse.org/t/-/226094
2022-05-04 14:07:22 -03:00
2381f18eba DEV: Convert notify_about_queued_posts_after to accept a float (#16637)
Add support for `notify_about_queued_posts_after` to be set to a float to allow for 15 min increments
2022-05-04 11:33:43 -05:00
dcc7f2a55e DEV: Convert notify_about_flags_after to float (#16633)
Add support for `notify_about_flags_after` to be set to a float.
2022-05-04 11:19:43 -05:00
64f03a7d05 DEV: Fix stylesheet watcher (#16635) 2022-05-04 11:58:52 -04:00
2d143ec2fb DEV: Improve lefthook config and remove some slow hooks (#16626)
They were slowing down checkout, merge and rewrite.
This also cleans up the "lints" section which was running into problems with `{all_files}` being too much for some tools to handle. And it makes sure that eslint and prettier runs for core plugins as well.
2022-05-04 17:37:01 +02:00
28e8ae553d FIX: Missing translation when translation override contained a %{key} (#16625)
This happened only for languages other than "en" and when `I18n.t` was called without any interpolation keys. The lib still tried to interpolate keys because it interpreted the `overrides` option as interpolation key.
2022-05-04 17:35:22 +02:00
9b6eea2023 Build(deps-dev): Bump discourse_dev_assets from 0.0.3 to 0.0.4 (#16631)
Bumps [discourse_dev_assets](https://github.com/discourse/discourse_dev_assets) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/discourse/discourse_dev_assets/releases)
- [Commits](https://github.com/discourse/discourse_dev_assets/compare/v0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: discourse_dev_assets
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 17:18:10 +02:00
0d30c19b7e DEV: Drop our mail gem fork (#16622)
Bianca's patch was finally released (in rc release for now, but still!)
2022-05-04 16:53:53 +02:00
71a4e9db85 DEV: Use Ember getter and explicitly check for undefined (#16618)
Context -> https://deprecations.emberjs.com/v3.x/#toc_ember-metal-get-with-default
2022-05-04 09:37:42 -05:00
db9ae32e41 FIX: Skip invalid custom_field json in hotlinked_media migration (#16630)
Truly testing for JSON validity would require defining a new postgres function. Checking just the first character should take care of all the cases of invalid historic data that we've seen.
2022-05-04 15:05:18 +01:00
62ed7d4968 DEV: replace depreciated {{hasBlock}} (#16629) 2022-05-04 09:02:19 -05:00
8695449cfc FIX: Validate permalink_normalizations setting (#16604)
When an admin enters a badly formed regular expression in the
permalink_normalizations site setting, a RegexpError exception is
generated everytime a URL is normalized (see Permalink.normalize_url).

The new validator validates every regular expression present in the
setting value (delimited by '|').
2022-05-04 14:33:06 +03:00
485fc4636a FEATURE: Add fallback to suggested value when auth_overrides_username (#16612)
If the identity provider does not provide a precise username value, then we should use our UserNameSuggester to generate one and use it for the override. This makes the override consistent with initial account creation.
2022-05-04 11:22:09 +01:00
a35837dc0b Build(deps): Bump oauth from 0.5.9 to 0.5.10 (#16628)
Bumps [oauth](https://github.com/oauth-xx/oauth-ruby) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/oauth-xx/oauth-ruby/releases)
- [Changelog](https://github.com/oauth-xx/oauth-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oauth-xx/oauth-ruby/compare/v0.5.9...v0.5.10)

---
updated-dependencies:
- dependency-name: oauth
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 12:06:40 +02:00
68ccaa3acb DEV: Fix typos and outdated comments (#16614) 2022-05-04 14:12:18 +08:00
73940fa968 DEV: Use cloneJSON instead of spread operator (#16615)
Spread does shallow clone, so changes in these tests leak.
2022-05-04 14:11:45 +08:00
79c854d9be DEV: Remove RTLit gem (#16620)
Its only use was removed 7 years ago in #3377.
2022-05-04 14:11:12 +08:00
b01b1570ab FIX: Handle enum types during database restore (#16624)
c1db9687 introduced an postgres enum type. Our database restore logic did not handle custom types correctly, and would therefore raise a 'type already exists' error when restoring any backup.

This commit adds restore handling for enums, mirroring the similar logic for tables and views.
2022-05-04 08:40:34 +10:00
ad293e510d FIX: destroys instance when hiding date popover (#16623)
This fix attempts to fix an issue where the preview was not updated after changing timezone. Changing time would work as it would recreate the date DOM element and as a result, reset the popper.
2022-05-03 23:47:25 +02:00
bc0eca1976 DEV: Update puppeteer, fix deprecations, lint (#16616)
1. Updates puppeteer to x
2. Fixes deprecations:
    ```
    waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.
    ```
3. Lints/prettyfies the smoke_test.js file
2022-05-03 20:58:58 +02:00
1c9d8b4999 FIX: Handle invalid JSON from downloaded_images custom fields (#16613)
custom_field data on some sites has duplicate values for a given url key in the JSON value. This is invalid, so we should drop the extra data.
2022-05-03 18:51:25 +01:00
175e6e6061 DEV: Add Ember CLI workspace license checks (#16603)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-05-03 13:06:19 -04:00
bebb4fd111 FIX: Handle duplicates in hotlinked_media migration (#16611)
In the old custom_field-based system, it was possible for a url to be both 'downloaded' and 'broken'. The new table enforces uniqueness, so we need to drop invalid data.
2022-05-03 17:17:27 +01:00
96e7c85177 FIX: updated filtered replies when replies exist (#16610) 2022-05-03 11:16:20 -05:00
f219ea562f Build(deps): Bump oauth from 0.5.8 to 0.5.9 (#16607)
Bumps [oauth](https://github.com/oauth-xx/oauth-ruby) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/oauth-xx/oauth-ruby/releases)
- [Changelog](https://github.com/oauth-xx/oauth-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oauth-xx/oauth-ruby/commits)

---
updated-dependencies:
- dependency-name: oauth
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 17:33:34 +02:00
d58a1e180d DEV: Update ember-try to 2.0.0 (#16606) 2022-05-03 11:04:16 -04:00
19d2d55011 FIX: Ensure post_hotlinked_media index does not exceed size limit (#16609)
On some installations, this would fail with 'index row size exceeds btree version 4 maximum'. This commit replaces the (post_id, url)` index with a `(post_id, md5(url))` index, which is much more space efficient.
2022-05-03 15:47:58 +01:00
51e29d3ca8 Update translations (#16608) 2022-05-03 15:30:59 +02:00
c1db968740 DEV: Move hotlinked image information into a dedicated table (#16585)
This will make future changes to the 'pull hotlinked images' system easier. This commit should not introduce any functional change.

For now, the old post_custom_field data is kept in the database. This will be dropped in a future commit.
2022-05-03 13:53:32 +01:00