Commit Graph

42915 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 16cfbed89d
DEV: Upgrade Rails to 6.1.4.1. (#14098)
This pulls in a fix for CVE-2021-22942 but we're not tagging it as a
security fix because Discourse is not affected by it in production.
2021-08-20 10:20:08 +08:00
dependabot[bot] 70552a2d43
Build(deps): Bump rubocop from 1.19.0 to 1.19.1 (#14095)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: rubocop
  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>
2021-08-20 08:25:17 +08:00
dependabot[bot] 9f71dee98e
Build(deps-dev): Bump listen from 3.6.0 to 3.7.0 (#14096)
Bumps [listen](https://github.com/guard/listen) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: listen
  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>
2021-08-20 08:25:04 +08:00
Andrei Prigorshnev d1781e4c7d
FEATURE: improve "blank page syndrome" on the user bookmarks page 2021-08-20 00:08:59 +04:00
Joffrey JAFFEUX 2bbc97fda5
DEV: UserOption.user_tzinfo (#14088)
Provides a safe way to retrieve the timezone of a user.

This is not used in core yet, but used in multiple plugins.
2021-08-19 21:56:14 +02:00
Joe e1815a125d
DEV: adds plugin-outlet before category in /latest (#14092)
Adding this so themes can avoid template overrides.
2021-08-20 03:02:40 +08:00
Bianca Nenciu a56122f2d3
FIX: Always reload post's raw when editing a post (#14085)
Sometimes the message bus update can be delayed and editing a post when
that happens will automatically result in a draft conflict.
2021-08-19 15:29:48 +03:00
David Taylor 5eb4e642a6
DEV: Rename discourse-presence endpoints and messagebus channels (#14089)
We are working to introduce a general core API for presence, which will clash with this plugin's `/presence` namespace

This commit introduces no functional change. There may be a slight interruption in discourse-presence functionality during a deploy of this commit.
2021-08-19 13:04:31 +01:00
Osama Sayegh ec352a1969
FEATURE: Order pinned topics by their `pinned_at` column (#14090)
Currently, pinned topics are ordered by the `bumped_at` column. This behavior is not desired because it gives admins no control over the order of pinned topics. This PR makes pinned topics ordered by the `pinned_at` column. A topic that is pinned last appears first in topic lists. If an admin wants an already pinned topic to appear first in the list of pinned topics, they'll have to unpin that topic and pin it again.

Meta topic: https://meta.discourse.org/t/how-do-i-set-the-order-of-pinned-topics/16935/23?u=osama.
2021-08-19 14:43:58 +03:00
Andrei Prigorshnev 46cdddbac9
FIX: pick-files-button component (#14045)
A file should be accepted if it has supported extension OR supported MIME type.
2021-08-19 14:56:03 +04:00
Dan Ungureanu c0ec1e931e
FIX: Make themes:update work with multisites (#14082)
Running this Rake task in a multisite cluster updated only the default
site.
2021-08-19 09:41:58 +03:00
Arpit Jalan c481f2ce16
UX: do not show selected composer education messages on whisper post (#14078)
This commit disables the "sequential_replies" and "duplicate_link"
education message on composer when creating a whipser post.
2021-08-19 09:32:32 +05:30
Roman Rizzi a50cb61dd5
FIX: Deprecated method should still behave the same. (#14067) 2021-08-19 09:58:26 +08:00
Grayden 64ead3c3a1
FIX: Revoking admin or moderator status doesn't require refresh to delete/anonymize/merge user (#14073)
* FIX: Revoking admin or moderator status doesn't require refresh to delete/anonymize/merge user

On the /admin/users/<id>/<username> page, there are action buttons that are either visible or hidden depending on a few fields from the AdminDetailsSerializer: `can_be_deleted`, `can_be_anonymized`, `can_be_merged`, `can_delete_all_posts`.

These fields are updated when granting/revoking admin or moderator status. However, those updates were not being reflected on the page. E.g. if a user is granted moderation privileges, the 'anonymize user' and 'merge' buttons still appear on the page, which is inconsistent with the backend state of the user. It requires refreshing the page to update the state.

This commit fixes that issue, by syncing the client model state with the server state when handling a successful response from the server. Now, when revoking privileges, the buttons automatically appear without refreshing the page. Similarly, when granting moderator privileges, the buttons automatically disappear without refreshing the page.

* Add detailed user response to spec for changed routes.

Add tests to verify that the revoke_moderation, grant_moderation, and revoke_admin routes return a response formatted according to the AdminDetailedUserSerializer.
2021-08-19 09:57:16 +08:00
dependabot[bot] 617ca563f6
Build(deps): Bump rails-html-sanitizer from 1.3.0 to 1.4.1 (#14086)
Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.3.0...v1.4.1)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  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-19 09:21:18 +08:00
Arpit Jalan cfc280676e
FIX: do not show default locale option on site text customization (#14083) 2021-08-19 05:54:21 +05:30
Martin Brennan 2bf2d799c3
FIX: Bookmark delete button alignment in modal-footer (#14087)
The commit cd38ec2a4d broke
the bookmark delete button alignment in the modal.
2021-08-19 10:15:50 +10:00
Penar Musaraj 052c78381b
FIX: Include tags in quick search suggestions (#14080)
Followup to 438a762956
2021-08-18 14:14:10 -04:00
Andrei Prigorshnev ded6a4a0ea
FIX: add a string for the Unseen view tab tooltip (#14079) 2021-08-18 20:50:53 +04:00
Bianca Nenciu 5c9abab0cd
FIX: Remove markers from all translated languages (#14081)
Emails can include the marker in a different language, depending on
site and user settings. The email receiver always looked for the marker
in default language.
2021-08-18 19:42:04 +03:00
Arpit Jalan 7db3888f17
FIX: log proper error message when SSO nonce verification fails (#14077) 2021-08-18 18:44:12 +05:30
Bianca Nenciu 4380ba34d5
FIX: Make site tasks work with duplicated uploads (#13972)
Uploads can be reused between site settings. This change allows the same
upload to be exported only once and then the same file is reused. The
same applies to import.
2021-08-18 15:57:31 +03:00
Alan Guo Xiang Tan d13716286c
FIX: Unread group PMs should use `GroupUser#first_unread_pm_at`. (#14075)
This bug was causing unread PMs for groups to appear inaccurate.
2021-08-18 11:23:28 +08:00
dependabot[bot] 3d92555f7a
Build(deps): Bump oj from 3.13.1 to 3.13.2 (#14070)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.1 to 3.13.2.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.1...v3.13.2)

---
updated-dependencies:
- dependency-name: oj
  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>
2021-08-18 10:44:33 +08:00
dependabot[bot] 271bab92f2
Build(deps): Bump fast_blank from 1.0.0 to 1.0.1 (#14071)
Bumps [fast_blank](https://github.com/SamSaffron/fast_blank) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/SamSaffron/fast_blank/releases)
- [Commits](https://github.com/SamSaffron/fast_blank/compare/1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: fast_blank
  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>
2021-08-18 10:44:07 +08:00
Arpit Jalan 6646ee3046
FIX: if the category slug is not present then search via ID (#14060) 2021-08-18 05:48:06 +05:30
Martin Brennan 49a0552096
DEV: Remove experimental uploader notice in composer (#14074) 2021-08-18 10:17:53 +10:00
Martin Brennan cd38ec2a4d
FIX: Move bookmark modal buttons into modal-footer (#14072) 2021-08-18 08:51:57 +10:00
Rafael dos Santos Silva 560c13211a
DEV: Allow passing a category parameter when importing a topic (#14069)
This will be used in the rss pooling plugin to address the feature
request at https://meta.discourse.org/t/-/200644?u=falco
2021-08-17 18:17:07 -03:00
Joffrey JAFFEUX 823f22ae5e
FIX: uses keyUp as widgets dont handle bubbling (#14068)
discourse/app/widgets/search-menu.js is using keyDown to handle all kind of behaviors, using keyUp here prevents override.
2021-08-17 15:30:57 -04:00
Penar Musaraj 40f7edd276
FIX: Do not display the color scheme ID in interface dropdown (#14066)
When a theme's default color scheme is not marked as user selectable, we were outputting the numeric ID in the UI. This outputs "Theme default" instead.
2021-08-17 15:05:17 -04:00
Penar Musaraj 08a3aa546b
DEV: Include `login_required` attribute in basic info endpoint (#14064)
This is useful in the DiscourseHub mobile app, currently the app queries
the `about.json` endpoint, which can raise a CORS issue in some cases,
for example when the site only accepts logins from an external provider.
2021-08-17 14:05:51 -04:00
Jay Pfaffman db8c33ad92 update INSTALL-cloud for discourse-setup
`discourse-setup`'s prompts changed, but they weren't changed in INSTALL-cloud as described in https://meta.discourse.org/t/discourse-installation-on-azure-not-reachable/36880/10?u=pfaffman

This brings INSTALL-cloud in line with the earlier changes to `discourse-setup`.
2021-08-17 13:20:03 -04:00
Joffrey JAFFEUX c65822d47b
FIX: allows paste from context menu to work (#14061)
- uses keyDown for Enter event
- input for other keys and pasting
2021-08-17 16:50:34 +05:30
dependabot[bot] ecb117df59
Build(deps-dev): Bump bullet from 6.1.4 to 6.1.5 (#14057)
Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.1.4 to 6.1.5.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/6.1.4...6.1.5)

---
updated-dependencies:
- dependency-name: bullet
  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>
2021-08-17 10:51:49 +08:00
Martin Brennan 90ab520d06
FIX: Pass fileName to error handler for media optimization (#14058)
The file name is used to look up the promise to resolve; it
was being passed for the successful path but not for the
error path.
2021-08-17 09:33:16 +10:00
Alan Guo Xiang Tan 9b7c17b925
DEV: Remove references to stale branches in github actions. (#14053) 2021-08-16 13:29:07 +08:00
Jacob Mischka f9247dabcc
Replace `-depth` -> `-maxdepth` in boot_dev (#14046)
The `-depth` flag is incorrect on Linux, it does not take an argument
and causes an error and results in no plugins ever being found.

Copied from `man find`:

```
The global options occur after the list of start points, and so are not the same kind of option as -L, for example.

       -d     A synonym for -depth, for compatibility with FreeBSD, NetBSD, MacOS X and OpenBSD.

       -depth Process each directory's contents before the directory itself.  The -delete action also implies -depth.

       ...

       -maxdepth levels
              Descend at most levels (a non-negative integer) levels of directories below the starting-points.  Using -maxdepth 0  means
              only apply the tests and actions to the starting-points themselves.
```
2021-08-16 13:28:54 +08:00
Alan Guo Xiang Tan 11b421525c DEV: Remove an unnecessary join in `TopicTrackingState.report` take 2.
This reverts commit f438cb8e65.
2021-08-16 13:26:45 +08:00
Alan Guo Xiang Tan 94fe5d9bf7 DEV: Disable Ember CLI tests on Github.
Tests are consistently failing on Github so we're disabling it for now.
2021-08-16 13:24:21 +08:00
Martin Brennan f438cb8e65
Revert "DEV: Remove an unnecessary join in `TopicTrackingState.report`." (#14054)
This reverts commit 06ee0e5a51.
2021-08-16 13:54:34 +10:00
Martin Brennan d7390f48c7
FIX: Clean up upload events properly in composer (#14052)
I was storing the wrong object as the event listener
reference for the paste and mobile upload button click
events so they were not being cleaned properly on element
destruction.

Also renamed `uploadButton` to the more descriptive
`mobileUploadButton`.
2021-08-16 12:59:27 +10:00
Alan Guo Xiang Tan 06ee0e5a51 DEV: Remove an unnecessary join in `TopicTrackingState.report`. 2021-08-16 10:55:44 +08:00
awesomerobot b801319fb8 UX: add a title to the user filter input 2021-08-16 10:53:05 +08:00
dependabot[bot] 7d69ea1596 Build(deps-dev): Bump parallel_tests from 3.7.0 to 3.7.1
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.7.0...v3.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:52:47 +08:00
dependabot[bot] c3a3a2ed24 Build(deps-dev): Bump rspec-rails from 5.0.1 to 5.0.2
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/rspec/rspec-rails/releases)
- [Changelog](https://github.com/rspec/rspec-rails/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v5.0.1...v5.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 10:52:32 +08:00
Martin Brennan f9e877dbff
FIX: Composer Processing/Uploading status not clearing on cancel and trash (#14050)
When the composer reply is cancelled and the draft is trashed,
the isUploading and isProcessing statuses were not being reset,
so when the composer was opened again the Uploading... or
Processing... message still showed even when the uploads had
been cancelled correctly.

The regular composer-upload mixin suffered the same problem
as the uppy one, where the Processing/Uploading message was not
reset when a reply was cancelled and the draft destroyed.
2021-08-16 09:55:55 +10:00
Discourse Translator Bot 0e53769f71
Update translations (#13994) 2021-08-14 10:18:05 +02:00
Kris 2c282a5a47
Replace README logo with PNG (#14044) 2021-08-13 14:23:49 -04:00
Kris 104e0ad8b2
Github doesn't like inline SVGs in the README (#14043) 2021-08-13 13:26:20 -04:00