Commit Graph

42490 Commits

Author SHA1 Message Date
Jordan Vidrine 465db1e5b5
FIX: Adjust poll buttons (#13924)
* FIX: Adjust poll buttons

* REFACTOR: Move styles to desktop stylesheet
2021-08-03 10:03:18 +08:00
Jordan Vidrine 2c3b4ff135
UX: UX Fixes (#13918)
* UX: Adjust name alignment on email group chooser

* UX: Remove dotted line when using j/k navigation on topic
2021-08-02 17:36:48 -05:00
Martin Brennan b88d8c8894
FIX: Use reply-to address for incoming emails if present (#13896)
When the Reply-To header is present for incoming emails we
want to use it instead of the from address. This is usually the
case when forwarding an email via a mailing list into Discourse.

For now we are only using the Reply-To header if the email has
been forwarded via Google Groups, which is why we are checking the
X-Original-From header too. In future we may want to use the Reply-To
header in more cases.
2021-08-03 08:01:17 +10:00
Rafael dos Santos Silva e92163367d
FIX: Upload placeholder was missing line break (#13917) 2021-08-02 16:33:51 -03:00
Jean e7b8e75583
FEATURE: Add post edits count to user activity (#13495) 2021-08-02 10:15:53 -04:00
Joe 7b56325f89
UX: adds hover title with full date to admin users columns (#13913)
This PR adds a hover title to a few columns on the admin users' page

/admin/users/list/active

The hover title will show the date in full format on those columns with shortened dates
2021-08-02 20:54:05 +08:00
Bianca Nenciu fbf7627c8e
FIX: Make search work with sub-sub-categories (#13901)
Searching in a category looked only one level down, ignoring the site
setting max_category_nesting. The user interface did not support the
third level of categories and did not display them in the "Categorized"
input of the advanced search options.
2021-08-02 14:04:13 +03:00
Alan Guo Xiang Tan 016efeadf6
FEATURE: New and Unread messages for user personal messages. (#13603)
* FEATURE: New and Unread messages for user personal messages.

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2021-08-02 12:41:41 +08:00
Arpit Jalan fe3e18f981
FIX: do not show private group flair on user avatars (#13872)
Meta ref: https://meta.discourse.org/t/visible-flair-for-invisible-groups-is-that-on-purpose/167674
2021-08-02 06:21:00 +05:30
dependabot[bot] 2d02ae36b5
Build(deps): Bump faraday from 1.5.1 to 1.6.0 (#13908)
Bumps [faraday](https://github.com/lostisland/faraday) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: faraday
  dependency-type: indirect
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 00:47:10 +02:00
dependabot[bot] d43c538b58
Build(deps): Bump loofah from 2.10.0 to 2.11.0 (#13909)
Bumps [loofah](https://github.com/flavorjones/loofah) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/flavorjones/loofah/releases)
- [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/loofah/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: loofah
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 00:46:25 +02:00
Kris 00820f0fad
UX: History controls should use nav-pill styles (#13904) 2021-07-30 19:52:15 -04:00
Rafael dos Santos Silva d2ab5ab53f
FIX: Better composer placeholder handling during media optimization (#13907) 2021-07-30 18:46:55 -03:00
1resu c640eee512 Update .ruby-version.sample
...to match the recommended Ruby version
2021-07-30 14:42:14 -04:00
Jean ac777440fd
FIX: Validate value of custom dropdown user fields - dropdowns and multiple selects (#13890) 2021-07-30 13:50:47 -04:00
jbrw 2f28ba318c
FEATURE: Onebox can match engines based on the content_type (#13876)
* FEATURE: Onebox can match engines based on the content_type

`FinalDestination` now returns the `content_type` of a resolved URL.

`Oneboxer` passes this value to `Onebox` itself. Onebox engines can now specify a `matches_content_type` regex of content_types that the engine can handle, regardless of the URL.

`ImageOnebox` will match URLs with a content type of `image/png`, `jpg`, `gif`, `bmp`, `tif`, etc.

This will allow images that exist at a URL without a file type extension to be correctly rendered, assuming a valid `content_type` is returned.
2021-07-30 13:36:30 -04:00
Andrei Prigorshnev f0d048b42a
DEV: don't swallow a promise from group.findMembers method and switch to using async/await (#13888) 2021-07-30 21:00:34 +04:00
Jarek Radosz f740c1a952
DEV: Clear all `navItem` information between tests (#13903)
Expands the original `clearCustomNavItemHref` from #13025. Fixes issues with discourse-assign tests.
2021-07-30 18:05:04 +02:00
David Taylor 0ac2cfa68c
DEV: Add `GeoList2-ASN.mmdb` and `.bundle` to `.gitignore` (#13902)
- `GeoList2-ASN.mmdb` is one of the MaxMind databases we use for geolocation
- `.bundle/` is created when you run something like `bundle config set --local ...`
2021-07-30 16:17:55 +01:00
David Taylor ccf1cd0ca6
UX: Improve copy when a group member search returns no results (#13899)
Previously it would say "There are no members in this group". Now it says "No members match that search."

https://meta.discourse.org/t/group-username-search-empty-search-message-is-wrong/198609
2021-07-30 11:40:21 +01:00
Discourse Translator Bot 0c422cff1e
Update translations (#13898) 2021-07-30 11:30:10 +02:00
Gerhard Schlager a37b5b177b
FIX: Remapping of uploads could fail during restore of backup (#13897)
Sidekiq should be paused until the end of the restore, otherwise it might interfere (deadlock) with the remap of upload URLs in posts.
2021-07-30 11:25:28 +02:00
Bianca Nenciu 531dbc5e6a
FIX: Do not offer to save draft if invalid (#13863)
An invalid draft is the draft of a topic with a short title or body.
The client does not save these, but it will ask the client if they want
to save it. Even if the answer is 'yes', the draft is discarded. This
commit skips Save button for small drafts.
2021-07-30 10:43:09 +03:00
Alan Guo Xiang Tan 849827841f Revert "DEV: Move private message topic tracking state publish into sidekiq."
This reverts commit c51c80466c.

There is a conditional in post jobs enqueuer that only enqueues the job
for non-PM posts.
2021-07-30 11:36:01 +08:00
Alan Guo Xiang Tan 5633c40e50 DEV: Bump client side plugin-api version.
Follow-up to  91456ad2cb
2021-07-30 10:12:16 +08:00
Alan Guo Xiang Tan 5a47b351ac DEV: Remove ember export which has long been deprecated. 2021-07-30 09:39:31 +08:00
dependabot[bot] 4cd388e84f Build(deps): Bump puma from 5.3.2 to 5.4.0
Bumps [puma](https://github.com/puma/puma) from 5.3.2 to 5.4.0.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.3.2...v5.4.0)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-30 09:34:31 +08:00
Blake Erickson 1c60be7658
DEV: Document anonymize user api endpoint (#13893)
Adding the anonymize user endpoint to the api docs.

See: https://meta.discourse.org/t/158704/7
2021-07-29 17:40:41 -06:00
Kris 200a75e4b6
re-show excerpts on bookmark page (#13892) 2021-07-29 18:50:58 -04:00
Kris 668272387d
UX: use share modal in dominating topic msg (#13837) 2021-07-29 16:36:02 -04:00
Mark VanLandingham c51b39302c
FIX: Typu in intercept-click (#13889) 2021-07-29 15:15:10 -05:00
Mark VanLandingham 91456ad2cb
DEV: Plugin API to add card listener elements (#13887) 2021-07-29 14:25:10 -05:00
Kris a049b8f596
UX: User bookmark page style adjustments (#13869) 2021-07-29 12:11:15 -04:00
David Taylor 1e66e4602f
UX: Update styling of readonly values in signup form (#13886)
During some authentication flows (e.g. external auth with validated emails), some fields on the signup form are readonly. Previously, they were rendered in a simple `<span>`, with no associated label. This commit makes them render in a disabled `<input>` field, so that the styling matches the rest of the form.

A subtle background is added to the disabled input to distinguish them from editable inputs.
2021-07-29 09:19:44 -05:00
Bianca Nenciu 300db3d3fa
FIX: Update draft count after creating a post (#13884)
When a post is created, the draft sequence is increased and then older
drafts are automatically executing a raw SQL query. This skipped the
Draft model callbacks and did not update user's draft count.

I fixed another problem related to a raw SQL query from Draft.cleanup!
method.
2021-07-29 17:06:11 +03:00
David Taylor 9b8c4d4790
FIX: Add users-directory-controls outlet to mobile template (#13883)
This outlet was added to the desktop template in e1175f9f
2021-07-29 14:40:36 +01:00
Joffrey JAFFEUX 74f0631acd
FIX: allows authentication data to be present in bootstrap (#13885) 2021-07-29 15:01:11 +02:00
Alan Guo Xiang Tan 2b5625bbf0
FIX: Avoid creating a post revision when topic tags have not changed. (#13881)
Co-authored-by: jmperez127 <jmperez127@gmail.com>
2021-07-29 08:14:25 -04:00
David Taylor c94879ea43 DEV: Remove incorrect method descriptions
These do not accurately describe the methods. They were likely copy/pasted from another controller.
2021-07-29 18:23:56 +08:00
Alan Guo Xiang Tan c51c80466c DEV: Move private message topic tracking state publish into sidekiq.
Same intend as b1f32f2f57.
2021-07-29 14:57:19 +08:00
Alan Guo Xiang Tan 543a2d70b2 FIX: PM tags route should work for usernames with a period. 2021-07-29 13:54:29 +08:00
dependabot[bot] 4dc5452682 Build(deps): Bump redis from 4.3.1 to 4.4.0
Bumps [redis](https://github.com/redis/redis-rb) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/redis/redis-rb/releases)
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v4.3.1...v4.4.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-29 13:29:30 +08:00
Alan Guo Xiang Tan 8775191cf3 Revert "DEV: suppress assets logs from qunit tests (#13871)"
This reverts commit 1b649016d9.

Test is failing with the following message:

```
navigate to  http://localhost:60099/qunit?hidepassed=1&seed=312984199721107128645754962579661839397&qunit_disable_auto_start=1
2021-07-29T02:57:13.303Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222
2021-07-29T02:57:43.823Z - (type: network/error) message: Failed to load resource: net::ERR_EMPTY_RESPONSE, url: http://localhost:60099/assets/discourse/tests/test_helper.js
ReferenceError: define is not defined
    at eval (discourse/tests/acceptance/about-test:1:1)
    at http://localhost:60099/assets/discourse/tests/core_plugins_tests.js:1:1
ReferenceError: require is not defined
    at eval (discourse/tests/test_starter:5:24)
    at http://localhost:60099/assets/discourse/tests/test_starter.js:1:1
2021-07-29T02:57:43.891Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222

Tests timed out
```
2021-07-29 13:28:24 +08:00
Dan Ungureanu 823c3f09d4
FIX: Reduce input of to_tsvector to follow limits (#13806)
Long posts may have `cooked` fields that produce tsvectors longer than
the maximum size of 1MiB (1,048,576 bytes). This commit uses just the
first million characters of the scrubbed cooked text for indexing.

Reducing the size to exactly 1MB (1_048_576) is not sufficient because
sometimes the output tsvector may be longer than the input and this
gives us some breathing room.
2021-07-28 18:25:14 +03:00
Joffrey JAFFEUX b673fee946
DEV: resets user search cache between tests (#13873)
The current behaviour was producing random tests failures which where consistently reproducible using `seed=32037592518471299633729129648744282271`

The cause of this error, is a previous test not giving any topicId or categoryId resulting in a cache key "undefined-undefined", just like a possibly previous test. Reseting cache between tests, seems the most straightforward and future proof solution
2021-07-28 15:32:49 +02:00
Alan Guo Xiang Tan 2818ebd19f DEV: Avoid duplication of gems in gemfile.
Follow-up to 08c6a7679d
2021-07-28 21:23:15 +08:00
Joffrey JAFFEUX 1b649016d9
DEV: suppress assets logs from qunit tests (#13871)
Partially reverts: 956f849250

Note that this way of running tests will soon be deprecated in favor of `ember test` and this shouldn’t matter anymore.
2021-07-28 14:27:45 +02:00
Andrei Prigorshnev 5a2ad7e386
DEV: remove calls to guardian from GroupActionLogger (#13835)
We shouldn't be checking if a user is allowed to do an action in the logger. We should be checking it just before we perform the action. In fact, guardians in the logger can make things even worse in case of a security bug. Let's say we forgot to check user's permissions before performing some action, but we still have a call to the guardian in the logger. In this case, a user would perform the action anyway, and this action wouldn't even be logged!

I've checked all cases and I confirm that we're safe to delete this calls from the logger.

I've added two calls to guardians in admin/user_controller. We didn't have security bugs there, because regular users can't access admin/... routes at all. But it's good to have calls to guardian in these methods anyway, neighboring methods have them.
2021-07-28 15:04:04 +04:00
Alan Guo Xiang Tan 32951ca2f4 FIX: User can change name when auth_overrides_name is enabled. 2021-07-28 14:40:57 +08:00
awesomerobot 343ea81ac3 UX: Remove theme-specific css, fix space 2021-07-28 09:34:33 +08:00