Commit Graph

57431 Commits

Author SHA1 Message Date
e4cab1c60b DEV: Set Jobs::SyncAclsForUploads to low queue (#30467)
This job is not mission critical and should not clog the default queue
2024-12-26 09:54:02 +08:00
61e5431d2a Hide before-header-panel-outlet on signup/login pages (#30432) 2024-12-26 01:39:26 +01:00
e4d0e0d95c Build(deps-dev): Bump sqlite3 from 2.4.1 to 2.5.0 (#30461)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
- [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:development
  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>
2024-12-26 06:19:34 +08:00
f6bb371498 Build(deps-dev): Bump rubocop-rails from 2.27.0 to 2.28.0 (#30460)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.27.0...v2.28.0)

---
updated-dependencies:
- dependency-name: rubocop-rails
  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>
2024-12-26 06:19:18 +08:00
4ccbf5c5ad Build(deps): Bump rack-test from 2.1.0 to 2.2.0 (#30457)
Bumps [rack-test](https://github.com/rack/rack-test) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/rack/rack-test/releases)
- [Changelog](https://github.com/rack/rack-test/blob/main/History.md)
- [Commits](https://github.com/rack/rack-test/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: rack-test
  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>
2024-12-24 09:23:13 +08:00
c6dd33cc06 DEV: Convert ResponsiveTable to gjs (#30430) 2024-12-23 21:50:13 +01:00
e90a92b298 fix (#30452) 2024-12-23 14:30:58 -06:00
4e5fc4654c DEV: fixes safari bug with content including linebreaks (#30451) 2024-12-23 18:39:28 +01:00
df1fc5bca8 FIX: Consistently notify lowest post number if post_moved notification generation (#30448)
We currently query the posts table without an order when notifying users of moved posts. Generally the query will return the lowest post number post (b/c ID correlates with post_number in most cases) but not always. This adds an order to the post query in notify_moved_posts job.

Also I removed some if statement nesting with early returns / guard clauses.
2024-12-23 09:53:43 -06:00
d69b7da3ca fix (#30450) 2024-12-23 09:42:55 -06:00
c3548aec5e DEV: Don't use 0-delay for test-env discourseLater (#30442)
`discourseLater` automatically uses delay of 10ms in test environment
2024-12-23 16:31:46 +01:00
d0e38977e3 UX: Remove chat hover effect from github status badge (#30447) 2024-12-23 16:31:29 +01:00
c1818bf40e DEV: Update a topic test to use settled (#30443)
…instead of `next()`/`assert.async()/done()`
2024-12-23 15:49:38 +01:00
3198326cda DEV: ensures channel has been created (#30445)
We were sometimes trying to fetch the channel before it has been created.
2024-12-23 13:54:22 +01:00
ae4a4b7d00 DEV: waits for mark_read! to be applied (#30444) 2024-12-23 13:54:13 +01:00
96b5c28cf9 DEV: correct test to visit category channel and not DM (#30441) 2024-12-23 13:36:02 +01:00
cf26d3f211 DEV: uses capybara helper has_field (#30438)
Checking for value of input directly is not waiting for value to be present.
2024-12-23 13:25:17 +01:00
1f46aed27e DEV: Automatically set LOAD_PLUGINS for bin/rspec (#30437)
When passing a `plugins/...` path to bin/rspec, it's reasonable to assume that the developer wants the tests to be run with plugins loaded. This commit automatically takes care of that.

If `LOAD_PLUGINS` is explicitly specified, then that value will always be used.

This mimics the logic we already have for database migrations in the `bin/rake` stub
2024-12-23 11:56:10 +00:00
c601b4112e DEV: no services are used in this component (#30439) 2024-12-23 12:47:53 +01:00
5962373ab9 FEATURE: Unhide 'suppress_secured_categories_from_admin' setting (#30436)
This setting suppresses topics and PMs from the admin UI unless they are participants. This is not a security feature: admins can always access all content on the site if needed.
2024-12-23 11:03:01 +00:00
e2cd1da26d FIX: All admins should be allowed to see deleted PM posts regardless of their mod status (#30206)
Admins and moderators can see a user's deleted posts via the `/u/:username/deleted-posts` route. Admins can always see any post on the site, but that's not always the case for moderators, e.g., they can't see all PMs. So, this route accounts for that and excludes posts that a moderator wouldn't be allowed to see if they were not deleted.

However, there's currently a problem with that logic where admins who also have moderation privileges, are treated the same way as moderators and prevented from seeing posts that pure moderators can't see. This commit fixes that problem and only applies the permission checks to moderators who don't have admin privileges.

Internal topic: t/143107.
2024-12-23 12:48:03 +03:00
b7971e17c2 Build(deps): Bump net-imap from 0.5.3 to 0.5.4 (#30431)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.5.3...v0.5.4)

---
updated-dependencies:
- dependency-name: net-imap
  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>
2024-12-23 09:41:53 +01:00
7b5132b0f2 Build(deps-dev): Bump jsuites from 5.8.0 to 5.8.3 (#30422)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.8.0 to 5.8.3.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  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>
2024-12-23 09:41:22 +01:00
7a9b2e343c Build(deps): Bump mini_scheduler from 0.17.0 to 0.18.0 (#30424)
Bumps [mini_scheduler](https://github.com/discourse/mini_scheduler) from 0.17.0 to 0.18.0.
- [Changelog](https://github.com/discourse/mini_scheduler/blob/main/CHANGELOG.md)
- [Commits](https://github.com/discourse/mini_scheduler/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: mini_scheduler
  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>
2024-12-23 09:11:41 +01:00
3c95aceeb0 DEV: Unify on-resize modifier situation (#30415)
1. Move chat's on-resize to core
2. Remove ember-on-resize-modifier
2024-12-23 09:11:17 +01:00
e58579a8d3 Build(deps): Bump openssl from 3.2.1 to 3.3.0 (#30423)
Bumps [openssl](https://github.com/ruby/openssl) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/ruby/openssl/releases)
- [Changelog](https://github.com/ruby/openssl/blob/master/History.md)
- [Commits](https://github.com/ruby/openssl/compare/v3.2.1...v3.3.0)

---
updated-dependencies:
- dependency-name: openssl
  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>
2024-12-23 09:10:26 +01:00
7b9d484bf4 DEV: Group highlight.js updates (#30426)
(and fix a typo)
2024-12-23 09:09:55 +01:00
6175562cb2 DEV: Convert HighlightSearch to gjs (#30406) 2024-12-23 08:54:59 +01:00
df9de3022f DEV: Convert ChooseMessage to gjs (#30408) 2024-12-23 08:47:15 +01:00
0336235c74 DEV: Use object spread instead of Object.assign (#30407) 2024-12-23 08:44:29 +01:00
6f01584607 DEV: Convert DirectoryTable to gjs (#30414)
* DEV: Convert DirectoryTable to gjs

* rename + remove
2024-12-23 16:44:26 +11:00
5b989fd5ae UX: add highlight for active nav in category settings (#30428) 2024-12-23 06:10:48 +01:00
f6282145aa FIX: Treat contact_url setting as a domain by default (#30225)
This commit makes the `contact_url` in the /about page behave as an absolute URL instead of a relative one if it doesn't explicitly start with a slash or a protocol. This prevents situation where, e.g., `www.example.com` is specified in the setting and the contact URL anchor tag ends up with a `href` that navigates to `<site address>/www.example.com` instead of just `www.example.com`. We prevent this by adding 2 leading slashes `//` to `contact_url` which makes the `href` resolves to the specified `contact_url` using the same protocol as the current site's.

Internal topic: t/143907.
2024-12-23 07:54:53 +03:00
4cf2f5d98a UX: fix misalignment + remove border-radius of topic progress element (#30427) 2024-12-23 04:17:23 +01:00
d98d940472 DEV: remove period-computation-mixin (#30396) 2024-12-23 10:03:58 +08:00
859d61003e DEV: API to register custom request rate limiting conditions (#30239)
This commit adds the `add_request_rate_limiter` plugin API which allows plugins to add custom rate limiters on top of the default rate limiters which requests by a user's id or the request's IP address.

Example to add a rate limiter that rate limits all requests from Googlebot under the same rate limit bucket:

```
add_request_rate_limiter(
  identifier: :country,
  key: ->(request) { "country/#{DiscourseIpInfo.get(request.ip)[:country]}" },
  activate_when: ->(request) { DiscourseIpInfo.get(request.ip)[:country].present? },
)
```
2024-12-23 09:57:18 +08:00
259f537d02 DEV: Convert DiscourseBanner to gjs (#30413) 2024-12-23 00:57:47 +01:00
0ed4c452d0 DEV: Convert CategoryReadOnlyBanner to gjs (#30412) 2024-12-23 00:55:49 +01:00
59b43b15ee DEV: Convert CategoryTitleBefore to gjs (#30411) 2024-12-23 00:54:48 +01:00
5ecc981f56 Build(deps-dev): Bump esbuild from 0.24.0 to 0.24.2 (#30417)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.24.0 to 0.24.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.0...v0.24.2)

---
updated-dependencies:
- dependency-name: esbuild
  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>
2024-12-22 23:04:14 +01:00
22457bddb1 Build(deps): Bump net-imap from 0.5.2 to 0.5.3 (#30425)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: net-imap
  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>
2024-12-22 23:01:46 +01:00
fb0a883d49 Build(deps): Bump csv from 3.3.1 to 3.3.2 (#30421)
Bumps [csv](https://github.com/ruby/csv) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/ruby/csv/releases)
- [Changelog](https://github.com/ruby/csv/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/csv/compare/v3.3.1...v3.3.2)

---
updated-dependencies:
- dependency-name: csv
  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>
2024-12-22 22:59:18 +01:00
ad18ee8984 Build(deps): Bump ace-builds from 1.37.0 to 1.37.1 (#30420)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.0 to 1.37.1.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.0...v1.37.1)

---
updated-dependencies:
- dependency-name: ace-builds
  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>
2024-12-22 22:59:10 +01:00
c6ccc756fe Build(deps-dev): Bump @embroider/webpack in the embroider group (#30416)
Bumps the embroider group with 1 update: [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack).


Updates `@embroider/webpack` from 4.0.8 to 4.0.9
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/webpack)

---
updated-dependencies:
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-22 22:33:02 +01:00
Sam
3fd3a76422 FIX: we introduced a Jobs::UserEmail which broke consistency checks (#30409)
Fix ensures all classes are rooted and there is a spec that will catch
failures next time
2024-12-22 21:33:47 +11:00
268d4d4fb9 FIX: more... should not show when there are no visible links (#30405)
When lurking on a Discourse as anonymous, if the sidebar is enabled, and a section contains only secondary links that are not visible to anonymous users, we should not display the "more..." button.

Otherwise it feels broken because clicking on it does nothing, since there are no "visible" links to be shown.

Internal ref t/144716
2024-12-21 01:06:46 +01:00
f392259e3f FIX: correclty allows to untoggle a fk toggle (#30404) 2024-12-21 00:55:39 +01:00
ebb6f1c2d2 FIX: better handle race condition when a channel is deleted (#30403)
NOTE: I wasn't able to reproduce locally, so that's my best guess as to what happens based on the production error logs.
It's also the reason why I haven't changed/added any tests...

Earlier today, we started seeing a growing number of errors in the `register_presence_channel_prefix("chat-reply")` handler of the chat plugin.
It was all coming from a Discourse where they make a heavy use of chat channels. They create and **delete** category channels regularly.

If a user has a thread in one of the channels that just got deleted, the client application might not be aware (just yet), asks the server to be connected to the "presence" bus of that channel, and BOOOM.

The following [line](fa0ad0306c/plugins/chat/plugin.rb (L325)) explodes because `chat_channel` is `nil`

```ruby
config.allowed_group_ids = chat_channel.allowed_group_ids
```

And why is `chat_channel` `nil`? Because when we [do](fa0ad0306c/plugins/chat/plugin.rb (L319))

```ruby
chat_channel = Chat::Thread.find_by!(id: thread_id, channel_id: channel_id).channel
```

The thread is still in the database, but the associated channel has been deleted.

A proper fix would most likely be to delete all the `Chat::Thread` associated to a deleted `Chat::Channel` but this might have more technical & business implications.
2024-12-21 00:49:21 +01:00
fa0ad0306c UX: improve link copy status transition (#30401) 2024-12-20 14:12:13 -05:00
3e8e861103 DEV: return full name in /notifications.json (#30335)
* wip: return full name in /notifications.json

* DEV: test for full name

* DEV: add test for enable_names=true

* DEV: add notification6, cleanup

* DEV: fix tests
2024-12-20 11:43:13 -05:00