Commit Graph

34984 Commits

Author SHA1 Message Date
Dan Ungureanu
dfc002d331
FIX: Count current penalty if it started more than 6 months ago (#8313) 2019-11-08 12:23:57 +02:00
Vinoth Kannan
edec922803 FIX: use 'about.json' endpoint instead of using ember model to get the data. 2019-11-08 14:17:51 +05:30
Sam Saffron
d4c9ed68a9 DEV: properly pass keyword args
Ruby 2.7 is going to deprecate our old and incorrect usage, use the correct
form for passing kwargs
2019-11-08 17:30:42 +11:00
Sam Saffron
652b6363a2 DEV: upgrade bootsnap
This fixes Ruby 2.7 support which we are starting to test
2019-11-08 17:07:58 +11:00
Sam Saffron
26c0199c01 DEV: update Rails to version 6.0.1
This version of Rails eliminates a monkey patch that is no longer needed!

Additionally it preps us for Ruby 2.7 support.
2019-11-08 16:56:30 +11:00
Martin Brennan
56d3e29a69
FIX: Badge and user title interaction fixes (#8282)
* Fix user title logic when badge name customized
* Fix an issue where a user's title was not considered a badge granted title when the user used a badge for their title and the badge name was customized. this affected the effectiveness of revoke_ungranted_titles! which only operates on badge_granted_titles.
* When a user's title is set now it is considered a badge_granted_title if the badge name OR the badge custom name from TranslationOverride is the same as the title
* When a user's badge is revoked we now also revoke their title if the user's title matches the badge name OR the badge custom name from TranslationOverride
* Add a user history log when the title is revoked to remove confusion about why titles are revoked
* Add granted_title_badge_id to user_profile, now when we set badge_granted_title on a user profile when updating a user's title based on a badge, we also remember which badge matched the title
* When badge name (or custom text) changes update titles of users in a background job
* When the name of a badge changes, or in the case of system badges when their custom translation text changes, then we need to update the title of all corresponding users who have a badge_granted_title and matching granted_title_badge_id. In the case of system badges we need to first get the proper badge ID based on the translation key e.g. badges.regular.name
* Add migration to backfill all granted_title_badge_ids for both normal badge name titles and titles using custom badge text.
2019-11-08 15:34:24 +10:00
Martin Brennan
64b4a7ba45
FIX: Ensure enforce 2FA for staff satisfied by security keys (#8316)
* If a staff user created only a security key as their single 2FA option. they continued to be prompted to create a 2FA option because we only considered this condition satisfied if a TOTP was added.
* The condition is now satisfied if TOTP OR security keys are enabled.
2019-11-08 15:11:53 +10:00
Vinoth Kannan
ba5b78a348
FEATURE: support to mute all categories by default. (#8295)
Instead of enabling `suppress_from_latest` setting on many categories now we can enable `mute_all_categories_by_default` site setting. Then users should opt-in to categories for them to appear in the latest and categories pages.
2019-11-08 08:28:11 +05:30
Sam Saffron
deec2cf578 FIX: drafts are unique by draft_key and user_id
Previously our index was non unique, causing situations where a user could
have multiple drafts stored in the table for the same exact entity.

This does not properly reflect reality and needed to change as in certain
cases duplicate drafts could be created causing internal data inconsistency
2019-11-08 11:45:46 +11:00
Blake Erickson
2db2003187 DEV: Add deprecation warning of non-header based API auth
This change adds a message to the admin panel if it detects an api
requests that doesn't use the new header based authentication method.

The message is to warn people to switch to header based auth and links
to the api documention topic on meta for more info.
2019-11-07 17:06:13 -07:00
David Taylor
99b0697bd9 FIX: Correct display of last used date in API key details UI 2019-11-07 23:41:43 +00:00
Mark VanLandingham
6275c05c0d
DEV: Move computed to discourseComputed (#8312) 2019-11-07 15:38:28 -06:00
Robin Ward
d74546f50e REFACTOR: Remove Discourse.Topic constant 2019-11-07 15:46:58 -05:00
Robin Ward
9d457fa51f REFACTOR: Remove Discourse.TrustLevel constant 2019-11-07 15:26:26 -05:00
Mark VanLandingham
f8d69253e8
FIX: Prettier to fix build (#8311) 2019-11-07 12:07:08 -06:00
Simon Cossar
b3e8fbe7d4
FIX: downcase SSO external email before checking against Discourse email (#8306)
* Downcase single_sign_on_record.external_email before checking against Discourse email

* Use &.downcase
2019-11-07 12:26:28 -05:00
David Taylor
54fe887c44 DEV: Remove prototype theme-watcher script
This has been superseded by the Theme CLI: https://meta.discourse.org/t/82950
2019-11-07 17:22:54 +00:00
Mark VanLandingham
9ffdbf912f
DEV: Import ember ENV instead of Ember.testing (#8305) 2019-11-07 11:20:35 -06:00
David Taylor
60a235d128
DEV: Allow execute_command to receive a block (#8303)
This makes it easy to run multiple commands with the same keyword arguments. The main use is for using `chdir` across multiple commands. The `Dir.chdir` method is not concurrency safe because it switches the working directory of the entire process.
2019-11-07 15:47:16 +00:00
Mark VanLandingham
f79796fcac DEV: Bump loofah version due to vulnerability 2019-11-07 10:02:02 -05:00
Daniel Waterworth
063a1d4077 Revert "FIX: The internal position on the topic timeline is a scroll position"
This reverts commit 9c1a713c6e.
2019-11-07 11:04:39 +00:00
Arpit Jalan
6a417c308f FIX: include onebox default options in development environment 2019-11-07 15:42:53 +05:30
Daniel Waterworth
9c1a713c6e FIX: The internal position on the topic timeline is a scroll position
... instead of a post index. This is so that updatePosition is called
when switching between the last two scroll positions.
2019-11-07 10:10:17 +00:00
Arpit Jalan
00c406520e FEATURE: allow FinalDestination to use custom user agent for specific hosts 2019-11-07 14:47:51 +05:30
Joffrey JAFFEUX
7d25d65ccb
DEV: adds support for input/change events on widgets (#8309) 2019-11-07 10:15:05 +01:00
Vinoth Kannan
5d42f052bc Minor copy edit
671f303b53
2019-11-07 11:39:17 +05:30
Sam Saffron
cf0f2c70cd FIX: regression not showing excerpts in mobile timeline
I think this is a result of: 87f0b56191
2019-11-07 16:10:31 +11:00
Arpit Jalan
c5df853dea Bump onebox version.
- fix for gfycat onebox in email
2019-11-07 10:03:12 +05:30
Sam Saffron
1d1dd2a4d4 PERF: cache static assets in NGINX for longer
Previously our cache would expire any asset that was not accessed for 10
minutes. This is way too short and was never intended. All the assets we
are serving are usually very long living assets like avatars and css files

1 day is a reasonable setting here cause it offers far better protection.
I would consider upping this to a week though longer term.

Maximum disk space of cache was increased as well to 600m. Very unlikely to
ever hit this except on very large sites.

Additionally, this places all the cached assets in nested directories, we
never want cached files to be in one giant directory cause it is inefficient
2019-11-07 12:12:24 +11:00
Gerhard Schlager
ee5b56914c FIX: Use long version of month names in date formats
Otherwise we'd need to add `date.abbr_month_names` to `server.en.yml`
2019-11-06 22:30:51 +01:00
Krzysztof Kotlarek
17366d3bcc
FEATURE: notify tag watchers when tag was added to post (#8299)
Issue was mentioned in this [meta topic](https://meta.discourse.org/t/send-a-notification-to-watching-users-when-adding-tag/125314)

It is working well when category is changed because NotifyCategoryChange job already got that code:
```
if post&.topic&.visible?
  post_alerter = PostAlerter.new
  post_alerter.notify_post_users(post, User.where(id: args[:notified_user_ids]))
  post_alerter.notify_first_post_watchers(post, post_alerter.category_watchers(post.topic))
end
```

For NotifyTagChange job notify post users were missing so it worked only when your notification was set to `watching first post`
2019-11-07 08:20:15 +11:00
Mark VanLandingham
bf778d66b5
FIX: unicode group names encoded for url (#8302) 2019-11-06 14:25:45 -06:00
Kris
6c9af6d81e FIX: Too much blank padding in video oneboxes 2019-11-06 15:07:51 -05:00
Penar Musaraj
61e35ce5dc DEV: Ignore renames when diffing theme changes (take 2)
Better fix than ca6adfbd
2019-11-06 14:45:18 -05:00
Kris
9ef97ff44f fix for 1aa96a5 2019-11-06 14:16:23 -05:00
Kris
b066a4128d Adding a text-overflow: ellipsis; mixin and related cleanup 2019-11-06 14:00:29 -05:00
Neil Lalonde
1aa96a5da4 Version bump to v2.4.0.beta7 2019-11-06 12:31:03 -05:00
David Taylor
f611aa6ada FIX: Correct translation key for api key revoke button 2019-11-06 16:13:12 +00:00
Neil Lalonde
b151963f18 Update translations 2019-11-06 10:43:13 -05:00
Penar Musaraj
0dfc594784 FIX: skip invalid URLs when checking for audio/video in search blurbs
Fixes 500 errors on search queries introduced in 580a4a8
2019-11-06 10:32:15 -05:00
Arpit Jalan
b869ef8a76 FIX: add <img> alt attribute for Summary emails 2019-11-06 15:26:46 +05:30
Krzysztof Kotlarek
5ad0dd0c23 FIX: tweak restorer spec to make it stableish (#8300) 2019-11-06 17:05:33 +11:00
Daniel Waterworth
e3b7f07916 DEV: Run prettier 2019-11-05 22:30:23 +00:00
Daniel Waterworth
59241df251 FIX: Display tags topic list correctly when none is selected for subcategories 2019-11-05 20:12:36 +00:00
Mark VanLandingham
ca14e3d83c
FIX: Build with prettier for imports (#8298) 2019-11-05 13:32:43 -06:00
Mark VanLandingham
edc135d9c5
DEV: Import set, setProperties, helper, and string functions (#8297) 2019-11-05 12:43:49 -06:00
Gerhard Schlager
61b1f9c36b FEATURE: Load translation overrides without JS eval 2019-11-05 19:16:38 +01:00
Penar Musaraj
ca6adfbdd6 DEV: Ignore renames when diffing theme changes
Renamed assets are quite noisy when checking whether a remote theme has local changes.
2019-11-05 11:52:04 -05:00
Mark VanLandingham
014f19b6ea
DEV: Import Promise from rsvp (#8296) 2019-11-05 10:37:32 -06:00
Gerhard Schlager
94a34af702 Update translations 2019-11-05 16:52:48 +01:00