Commit Graph

23637 Commits

Author SHA1 Message Date
Mark VanLandingham 47a91742b0
Revert "DEV: Move popups left if application.hbs wrapper is moved by theme" (#11184)
This reverts commit 95c871be3e.
2020-11-10 10:14:04 -06:00
Roman Rizzi 5ae82c0492
FIX: Show hidden posts to staff members. (#11171)
When looking at the list of a user's deleted posts, those that are also hidden are not listed. Context: https://meta.discourse.org/t/flagged-deleted-posts-do-not-show-up-on-users-profile/168527
2020-11-10 12:34:22 -03:00
Jordan Vidrine 0f38fc42e2
FIX: Remove duplicate category description (#11178)
This commit removes the duplicate category description on sub categories in the category list. I believe this went unnnoticed because we are hiding these by default.
2020-11-10 09:32:24 -06:00
Daniel Waterworth 3a5080b469
FIX: Renaming and deleting tags (#11169)
The REST adapter generates paths with the /tags/ prefix indescriminately,
but individual tag paths have been moved under the /tag/ prefix to allow
tags with names that would otherwise cause ambiguity like c.
2020-11-10 10:57:25 +00:00
David Taylor a7adf30357
FEATURE: Allow /u/by-external to work for all managed authenticators (#11168)
Previously, `/u/by-external/{id}` would only work for 'Discourse SSO' systems. This commit adds a new 'provider' parameter to the URL: `/u/by-external/{provider}/{id}`

This is compatible with all auth methods which have migrated to the 'ManagedAuthenticator' pattern. That includes all core providers, and also popular plugins such as discourse-oauth2-basic and discourse-openid-connect.

The new route is admin-only, since some authenticators use sensitive information like email addresses as the external id.
2020-11-10 10:41:46 +00:00
Sam ffc3da35a6
FIX: handle rapid concurrent SSO attempts more gracefully (#11180)
Rapid concurrent SSO attempts is something that happens quite frequently
in the wild at large enough scale.

When this happens conditions such as adding a user to a group could possibly
fire concurrently causing a user to be added to the same group twice and
erroring out.

To avoid all concurrency issues here we protect with a coarse distributed
mutex. This heavily mitigates the risk around concurrent group additions and
concurrent updates to user related records.
2020-11-10 10:40:41 +00:00
David Taylor cf21de0e7a
DEV: Migrate Github authentication to ManagedAuthenticator (#11170)
This commit adds an additional find_user_by_email hook to ManagedAuthenticator so that GitHub login can continue to support secondary email addresses

The github_user_infos table will be dropped in a follow-up commit.

This is the last core authenticator to be migrated to ManagedAuthenticator 🎉
2020-11-10 10:09:15 +00:00
Krzysztof Kotlarek 586c8efbd8
FEATURE: the ability to permanently destroy the private message (#11115)
PostDestroyer should accept the option to permanently destroy post from the database. In addition, when the first post is destroyed it destroys the whole topic.

Currently, that feature is limited to private messages and creator of the post. It will be used by discourse-encrypt to explode encrypted private messages.
2020-11-10 15:40:48 +11:00
Kris 694c7f2c98
reduce min-width for better spacing, follow-up to 1455421 (#11177) 2020-11-09 17:05:09 -06:00
Arpit Jalan 394f37cf66
FIX: do not use "max_tags_in_filter_list" setting for showing PM tags (#11146)
Ensure we do not respect max_tags_in_filter_list when showing the list of PM tags.

This filter is used on a full page view and there is not point limiting it to a small number.

The expectation is that PM tags are very rarely used, so a hard limit of 1000 should be safe for now.
2020-11-10 08:09:59 +11:00
Penar Musaraj 57bd85af31
UX: Minor cosmetic fixes to the wizard (#11172)
- Does not force users to type a description or a welcome topic
- Adds * marker for required text fields (site title and email)
2020-11-09 15:14:57 -05:00
Daniel Waterworth ec4c2a58ea
FIX: Paths with categories and tags were being generated incorrectly (#11167)
Paths prefixed with /tag/ are exclusively for when the tag name is the
next string in the path. Therefore, when a category is being used as
context, the path should start with /tags/ instead.
2020-11-09 12:34:52 +00:00
David Taylor a0095d6e52
UX: Show theme git branch for private repositories (#11166) 2020-11-09 11:33:38 +00:00
Joe 3414566466
UX: Remove label and add danger class to remove draft button (#11165) 2020-11-09 15:28:39 +08:00
Guo Xiang Tan 650da7b626 PERF: Update index for category in a background job.
Search indexing can get expensive and there is no need for us to block
the entire request just to wait for index to finish.
2020-11-09 13:51:26 +08:00
Sam 94cd5ac0b1
FIX: global setting needs to be coerced to float (#11162)
disable_search_queue_threshold needs to be coerced to a float so it is not
treated as a string when sub second values are provided.

Longer term fix is to possibly provide hints in the config so we do the
coersion automatically. However this would be a far more complex change.
2020-11-09 16:46:52 +11:00
Kris 1455421433
UX: truncate long usernames in multi-username notifications (#11153)
* UX: truncate long usernames in multi-username notifications

* remove extra class, clarify comments
2020-11-09 16:06:52 +11:00
Kris 8be04ff7f7
UX: Give furigana and other top-overflowing elements a little space (#11154) 2020-11-09 16:03:36 +11:00
Kris 4c0d027a5a
UX: truncate long nav items in dropdown menu (#11156) 2020-11-09 16:02:40 +11:00
Alan Guo Xiang Tan 0e4d966a74
DEV: Remove stale ignored_columns. (#11160) 2020-11-09 15:57:59 +11:00
Justin DiRose 09b8a61f65
FEATURE: Add Google Universal Analytics v4 as an option (#11123)
Per Google, sites are encouraged to upgrade from Universal Analytics v3 `analytics.js` to v4 `gtag.js` for Google Analytics tracking. We're giving admins the option to stay on the v3 API or migrate to v4. Admins can change the implementation they're using via the `ga_version` site setting. Eventually Google will deprecate v3, but our implementation gives admins the choice on what to use for now.

We chose this implementation to make the change less error prone, as many site admins are using custom events via the v3 UA API. With the site stetting defaulted to `v3_analytics`, site analytics won't break until the admin is ready to make the migration.

Additionally, in the v4 implementation, we do not enable automatic pageview tracking (on by default in the v4 API). Instead we rely on Discourse's page change API to report pageviews on transition to avoid double-tracking.
2020-11-06 14:15:36 -06:00
Mark VanLandingham 95c871be3e
DEV: Move popups left if application.hbs wrapper is moved by theme
We have a div that is inside #main because of the history of Ember explained here. Once we have Ember cli, we can use optional feature flags and disable creating this div with application-template-wrapper: false, and refactor this code and any plugins that rely on that div being present (some plugin regarding remote collaboration??).
2020-11-06 09:46:26 -06:00
Bianca Nenciu 0863c36221
FIX: Improve errors when invite to topic fails (#11133)
It used to simply say "not allowed" without giving any hint what the
problem could be. This commit refactors the code and tries to improve
readability.
2020-11-06 16:58:10 +02:00
Martin Brennan 00c8f520e9
FIX: Do not enable published page if secure media enabled (#11131)
There are issues around displaying images on published pages when secure media is enabled. This PR temporarily makes it appear as if published pages are enabled if secure media is also enabled.
2020-11-06 10:33:19 +10:00
Sam 2d4455161b
FIX: Correct "no tags" route in tag drop-down (#11142)
We refactored routes and removed /tags/none... instead is should be /tag/none
2020-11-06 10:28:57 +11:00
Jarek Radosz 1ca6434d40
DEV: Remove i18n-patches (#11139)
* DEV: Move toHumanSize patch into I18n proper
  The patch wasn't loaded in Ember CLI environment causing translation discrepancies.

* DEV: Remove String.prototype.i18n
  I don't think this patch is needed. Let the CI prove me wrong. :P
2020-11-06 00:08:36 +01:00
Krzysztof Kotlarek 9bfce1a8dd
FIX: trim no-break space in to-markdown (#11130)
No-break spaces were the reason for double spaces when pasting text to the composer.

https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769
2020-11-06 09:36:36 +11:00
Jarek Radosz 1b52cdedb1
DEV: Move more tests into modules (#11119)
Models, services, mixins, utilities, and most of the controllers
2020-11-05 20:23:28 +01:00
jbrw bba73fc15e
FEATURE: Allow category group moderators to delete topics (#11069)
* FEATURE - allow category group moderators to delete topics

* Allow individual posts to be deleted

* DEV - refactor for new `can_moderate_topic?` method
2020-11-05 12:18:26 -05:00
Arpit Jalan 436bd48512
UX: update topic small action post to add link for new linked topic URL (#11132)
https://meta.discourse.org/t/linked-topics-splitting-and-managing-megatopics/168992/4?u=techapj
2020-11-05 22:39:21 +05:30
Penar Musaraj 707ed01f33
UX: Wider canvas buttons in wizard (#11124) 2020-11-05 09:55:35 -05:00
Kris 3ee216c036
FIX: include header offset relative to window (#11114) 2020-11-04 21:14:17 -05:00
Roman Rizzi fa12302e77
FIX: Update review settings. (#11125)
We didn't update review settings even if the UI says it was successfully saved. After #11097, we started to clone each setting and store the changes there instead, but we still use the original objects when we perform the save action.
2020-11-05 12:26:59 +11:00
tshenry d778d99b55
FIX: limit_topics_per_day should only apply to regular topics (#11127)
PMs were being evaluted by both the limit_topics_per_day and limit_private_messages_per_day rate limiters when it should only be the latter.
2020-11-04 16:23:49 -08:00
Arpit Jalan 3397e0e38b
UX: sort user badges by Gold > Silver > Bronze. (#11117) 2020-11-04 22:17:47 +05:30
Arpit Jalan d237ada12f
FIX: enqueue PostCreator jobs outside transaction block (#11120)
The `enqueue_jobs` is not correctly post-processing the post since the
post is being created inside a transaction block. This commit explicitly
enqueues the job outside transaction block.
2020-11-04 21:41:05 +05:30
Arpit Jalan 24d1b1f159
UX: when creating linked topic use URL and let onebox work its magic (#11118)
When the linked topic is created we'll not hardcode the topic title and
let onebox work its magic instead so that the title can be updated
automatically.
2020-11-04 17:19:09 +05:30
Arpit Jalan 0cb4109cbb
FIX: group notification level cannot be null (#11109)
Group's `default_notification_level` cannot be null so there is no need
to provide "none" translation for group notification level dropdown.
2020-11-04 07:29:00 +05:30
Bianca Nenciu d2116f0029
FIX: Show error message if user is already silenced or suspended (#10988)
Users could be silenced or suspended by two staff members at the same time and
would not be aware of it. This commit shows an error message if another penalty
has been applied.
2020-11-03 17:38:56 +02:00
Jordan Vidrine d384e744a8
UI: Fix button overlapping longer group names in group card (#11104)
This commit fixes the group buttons from overlapping long group names in the group card.
2020-11-03 09:37:26 -06:00
Dan Ungureanu 3c51647872
DEV: Remove legacy tag and category routes (#10338)
* DEV: Remove client-side legacy tag and category routes

* DEV: Remove server-side legacy tag routes

* DEV: Refactor ListController#set_category

* FIX: Remove reference to discovery.parentCategory

* FIX: Refactor TagsController#set_category_from_params

* FIX: Build correct canonical URL for tags and categories

* DEV: Fix deprecation notice in Ruby 2.7

* DEV: Replace use of removed legacy tag route

* DEV: Add deprecation notices for old routes and controllers
2020-11-03 16:57:58 +02:00
David Taylor 5140ec9acf
DEV: Cleanup ignored user logic (#11107)
- IgnoredUser records should all now have an expiring_at value. This commit enforces that in the DB, and fixes any corrupt rows
- Changes to the ignored user list are now handled by the `/u/{username}/notification_level` endpoint. This allows setting expiration dates on the ignore. This commit removes the old logic for saving a list of usernames in the user preferences.
- Many specs were calling `IgnoredUser.create`. This commit changes them to use `Fabricate(:ignored_user)` for consistency
2020-11-03 12:38:54 +00:00
David Taylor 1b7d39fa85
FIX: Remove 4 month limit on IgnoredUser records (#11105)
b8c676e7 added the 'forever' option to the UI, and this is correctly stored in the database. However, we had a hard-coded limit of 4 months in the cleanup job. This commit removes the limit, so ignores can last forever.
2020-11-03 12:12:43 +00:00
Vinoth Kannan 9b593435b6
FIX: hide 'category read only banner' in categories list page. (#11072)
Previously, while navigating away from single category page to categories list page "category read only" banner is not hiding automatically.
2020-11-03 16:59:58 +11:00
Kane York 789e3775df
FIX: Make all email subject vars available in notification subjects (#11064)
A site owner attempting to use both the email_subject site setting and translation overrides for normal post notification
email subjects would find themselves frusturated at the lack of template argument parity.
Make all the variables available for translation overrides by adding the subject variables to the custom interpolation keys list and applying them.

Reported at https://meta.discourse.org/t/customize-subject-format-for-standard-emails/20801/47?u=riking
2020-11-02 20:00:11 -08:00
Kris b9fb1cebcd
Refactor: tags/show should use d-navigation (#10927) 2020-11-02 17:35:02 -05:00
Kris c5a4907800
Revert "FIX: adjust user card position, follow-up to da5841d (#11036)" (#11074)
This reverts commit 863f86c3a3, I misdiagnosed this issue
2020-11-02 14:25:17 -05:00
jbrw 9ff7f25106
DEV - handle malformed `page` param (#11093)
* DEV - handle malformed page params
2020-11-02 12:40:54 -05:00
Justin DiRose 03cd5baed9
FIX: Make addNavigationBarItem subfolder compatible (#11101)
@danielwaterworth suggested taking a look at this when reviewing a plugin using this API. 

When declaring a new nav item using `addNavigationBarItem` and including the `href` attribute, we don't currently process that URL to be subfolder compatible. 

Nav bar items coming in via the API are considered `ExtraNavItem` and the `href` value is passed straight through to the `buildItems` method, vs using the computed href method. This PR adds a simple `getURL` call on that href value to ensure it's subfolder-safe.

I also accounted for the `customHref` function in the API to make those URLs subfolder safe as well.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in Javascript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2020-11-02 11:30:23 -06:00
Penar Musaraj 5041ebe612
UX: Fix confusing admin UI for color scheme updates (#11100) 2020-11-02 11:28:04 -05:00