Commit Graph

36229 Commits

Author SHA1 Message Date
a47e0a3fda FIX: TOTP could not be used on sites with colons in their names
This is because the TOTP gem identifies as a colon as an addressable
protocol. The solution for now is to remove the colon in the issuer
name.

Changing the issuer changes the token values, but now it was completely
broken for colons so this should not be breaking anyone new.
2020-02-20 16:35:30 -05:00
c7787464cd FEATURE: Admins can configure the reflag cooldown window and if posts flagged as spam by TL3+ users get automatically hidden (#9010) 2020-02-20 14:43:33 -03:00
dd4a04e72c Build(deps-dev): Bump annotate from 3.0.3 to 3.1.0 (#9013)
Bumps [annotate](https://github.com/ctran/annotate_models) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/ctran/annotate_models/releases)
- [Changelog](https://github.com/ctran/annotate_models/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ctran/annotate_models/compare/v3.0.3...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-20 12:18:52 -05:00
7a09e2cce2 DEV: Improve video onebox stripping spec
Followup to 70819080
2020-02-20 11:45:12 -05:00
19dcc6bb7b FIX: Restore initState() call within discourse-location for subfolder
d7d4612b2df2b4f87dfe64aafdcda8b8e8142c18 removed the duplicate call to initState(). However, we are relying on a side effect of the duplicate call for subfolder sites to function correctly when accessed without a trailing slash. To avoid a large refactor before the stable release, this commit restores the old behavior.

Long term we should look at migrating to Ember's built-in location library, rather than maintaining our own (very similar) version

https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/routing/lib/location/history_location.ts
2020-02-20 16:41:50 +00:00
7b92280b97 UX: use same styling for username and user-name 2020-02-20 17:51:37 +05:30
f36719c1f5 FIX: respect prioritize_username_in_ux setting in email
UX: only the first attribute should be hyperlinked
UX: add margin based on attribute position
2020-02-20 17:47:16 +05:30
b0f4149d6e Suppres task spec output using capture_stdout 2020-02-20 14:47:47 +10:00
a3d576534a FIX: correct upload statistics report for external storage
Follows up #64b35120

This also corrects it so bytes used for internal storage counts all the space
used, previously it was only counting uploads not optimized images.

Additionally we now correctly count storage for optimized images.
2020-02-20 15:15:53 +11:00
254b57c812 FIX: When admin changes staff email still enforce old email confirm (#9007)
A follow-up correction to this change https://github.com/discourse/discourse/pull/9001.

When admin changes staff email still enforce old email confirm. Only allow auto-confirm of a new email by admin IF the target user is not also an admin. If an admin gets locked out of their email the site admin can use the rails console to solve the issue in a pinch.
2020-02-20 13:42:57 +10:00
5dc6100acc Work around deleted upload.access_control_post scoping issue
* TODO to come back and deal with this in a better way, it
  just needs to be done for the rake task to set secure media
  to work correctly
2020-02-20 10:57:40 +10:00
97d8f19387 FIX: When admin changes another user's email auto-confirm the change (#9001)
When admin changes a user's email from the preferences page of that user:

* The user will not be sent an email to confirm that their
  email is changing. They will be sent a reset password email
  so they can set the password for their account at the new
  email address.
* The user will still be sent an email to their old email to inform
  them that it was changed.
* Admin and staff users still need to follow the same old + new
  confirm process, as do users changing their own email.
2020-02-20 09:52:21 +10:00
20b90afad9 FIX: Remove broken error dismiss button 2020-02-19 23:03:52 +02:00
345764565f FIX: Respect muted tags for mailing list mode
If a user has a tag muted, don't send them emails about that tag.
We've done this forever for categories so it makes sense to do it
for tags too.
2020-02-19 15:14:42 -05:00
223edd1286 Build(deps-dev): Bump rubocop from 0.79.0 to 0.80.0 (#8997)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.79.0 to 0.80.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.79.0...v0.80.0)

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

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-02-19 14:36:36 -05:00
2a7f53065d FEATURE: Add plugin outlet below login/create, add outlet to mobile 2020-02-19 14:08:35 -05:00
fe6fe324c9 FIX: Minor linting issue for future rubocops 2020-02-19 14:04:56 -05:00
5b0025c816 Additional padding follow up to de559f3 2020-02-19 13:50:12 -05:00
812119f673 This rule was removed from Rubocop due to different behavior in Ruby 3.
See: https://github.com/rubocop-hq/rubocop/issues/7641
2020-02-19 13:44:20 -05:00
eaf516a5ad Build(deps-dev): Bump shoulda-matchers from 4.2.0 to 4.3.0 (#8989)
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/master/NEWS.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v4.2.0...v4.3.0)

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

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2020-02-19 13:41:38 -05:00
fd1e04ba0a UX: Improve small buttons appearance (#8990)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Kris  <kris.aubuchon@discourse.org>
2020-02-19 12:38:46 -05:00
6be685ac67 DEV: Find/replace deprecated decorators 2020-02-19 11:49:56 -05:00
8ec2d8a814 FIX: Disable save button for API key creation when invalid (#9005) 2020-02-19 16:33:09 +00:00
836ab73d59 FIX: Patch ActiveRecord SchemaCache for safe concurrency support
A single SchemaCache instance is maintained by the connection pool, and made available via a schema_cache method on each connection. When the SchemaCache instance is fetched from the pool, its internal connection reference is updated to equal the requesting connection. However, since there is only one instance of SchemaCache, this internal connection reference is updated everywhere, and can ultimately result in multiple threads accessing the same database connection. In Discourse, this could result in Sidekiq jobs getting 'stuck' in database connections.

This patch modifies SchemaCache so that it caches the internal connection on a per-thread basis

Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
Co-authored-by: Matt Palmer <mpalmer@hezmatt.org>
2020-02-19 16:26:02 +00:00
fdb45f2ba1 Follow-up padding fix for de559f3 2020-02-19 11:24:45 -05:00
de559f3fe3 FIX: Remove border-box from modal-body to avoid iOS fixed position bug 2020-02-19 11:08:15 -05:00
c954d083df Link website when reviewing users 2020-02-19 10:18:05 -05:00
74f2d48018 FIX: makes setting-object capable of defining value/name properties itself (#9003) 2020-02-19 10:01:21 +01:00
30e2867547 FIX: prevents setting default values on setting component to reload page
This would happen when clicking on "add all themes" for example.
2020-02-19 09:04:57 +01:00
32b3f55ef6 Revert "FIX: enums should be treated as flat arrays (#8995)"
This reverts commit 05be9beefda17714b41c51a43836caeabf34ee78.
2020-02-19 07:53:29 +01:00
377d2d3fad DEV: Silence spurious rubocop lint warning 2020-02-19 13:10:30 +11:00
a14a7f1cb8 DEV: Add optional support for running byebug when a PG Clash happens
Tracking down concurrency issues from backtraces and manual repros is a fraught process.
Sometimes you've just got to get your hands dirty and do a live debug.
2020-02-19 12:50:37 +11:00
9f8a27a132 DEV: Import makeArray from discourse-common instead using Ember global (#8977) 2020-02-19 00:57:58 +01:00
25ebfd5998 DEV: allows to import isPresent (#8993) 2020-02-18 23:41:15 +01:00
8f82d790d4 FIX: prevents notifications button to be cutoff on mobile (#8998) 2020-02-18 23:40:10 +01:00
05be9beefd FIX: enums should be treated as flat arrays (#8995) 2020-02-18 23:25:12 +01:00
67ee79f023 FIX: group members dropdown was broken on mobile (#8994) 2020-02-18 23:23:38 +01:00
7a054fc142 FIX: remove anchors from banner headings.
Else it will create UX issues when the banner is visible on top of the banner topic.
2020-02-19 02:55:04 +05:30
53054b41d2 FIX: Mentions updater should work regardless of .notify 2020-02-18 16:02:26 -05:00
041168c9b6 FIX: Group mentions were not being cooked the same was as previewed
If a group mention could be notified on preview it was given an `<a>`
tag with the `.notify` class. When cooked it would display differently.
This patch makes the server side cooking match the client preview.
2020-02-18 15:45:02 -05:00
163cbb4aa7 UX: Show mentions properly in small post messages 2020-02-18 14:38:33 -05:00
8a0abafc9d UX: Adjust width for topic notifications dropdown on mobile
Previously, the dropdown was set to 400px wide, which exceeds the available width on many mobile devices.
2020-02-18 14:17:34 -05:00
0b09f5299d DEV: Improve pg connection access logging
`ensure` that the accessing thread is set to nil after an action
2020-02-18 16:58:47 +00:00
99746c2850 FIX: ensures report-filter/category is correctly filtering (#8992) 2020-02-18 17:37:43 +01:00
ea49ca7ef5 DEV: Handle nil backtraces in pg access logs 2020-02-18 15:45:44 +00:00
2bdd1275ce DEV: Initialize pg access log mutex in non-sidekiq processes
Followup to be3e4ab3f55afb1f89bdd702f069b44a8bcef8e7
2020-02-18 14:20:28 +00:00
9441362c72 FEATURE: Support uploading a csv with either user emails or usernames (#8971) 2020-02-18 10:53:12 -03:00
be3e4ab3f5 DEV: Report simultaneous use of PG::Connection objects 2020-02-18 13:50:15 +00:00
66893c020f FIX: Use 'hostname' when Discourse.os_hostname is not available
This may be the case when DiscourseLogstashLogger is initialized before
the application (see unicorn.conf.rb)

This commit is a follow-up to 28292d275994145c8e295470dee6627bfd84c936.

Co-authored-by: David Taylor <david@taylorhq.com>
Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
2020-02-18 13:37:39 +02:00
59db2811b0 FIX: Disable poll options if user groups do not allow them (#8987) 2020-02-18 12:13:19 +02:00