Commit Graph

36443 Commits

Author SHA1 Message Date
c9d1577087 Let's not log the username/password
This could easily be seen by someone who shouldn't.
2020-03-11 12:48:10 -04:00
40f1201b39 DEV: Support adding keybindings via plugins (#9177) 2020-03-11 11:13:31 -05:00
6c948f27ea FIX: Missing constant in SMF2 importer (#9178) 2020-03-11 10:19:59 -05:00
3f9b310beb FIX: Typo on draft save 2020-03-11 12:12:28 -03:00
12af95d0dc FIX: ContactPicker was not setting invite input on topics 2020-03-11 11:49:00 -03:00
d3b53fb551 REFACTOR: removes legacy bootstrap css class (#9174) 2020-03-11 15:31:29 +01:00
1fca745beb DEV: applies default modal class to a modal when shown (#9175) 2020-03-11 15:31:08 +01:00
4a0f36e46c FIX: featured_topic.fancy_title was rendered without emojis (#9176) 2020-03-11 15:30:47 +01:00
61a2c3650d DEV: enforces ember-template-lint: no-partial (#9173)
selected-posts parial is kept and calling the new component to prevent errors with users who would have rewritten topic.hbs

dashboard-problems and version-checks seem less risky and have only been converted to components
2020-03-11 15:30:14 +01:00
4e0b2ae294 DEV: defines a constant for INPUT_DELAY (#9169) 2020-03-11 15:28:16 +01:00
40d7686234 Build(deps-dev): Bump webmock from 3.8.2 to 3.8.3 (#9167)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.8.2...v3.8.3)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-11 10:09:19 -04:00
a3f0543f99 Support for transpiling .js files (#9160)
* Remove some `.es6` from comments where it does not matter

* Use a post processor for transpilation

This will allow us to eventually use the directory structure to
transpile rather than the extension.

* FIX: Some errors and clean up in confirm-new-email

It would throw an error if the webauthn element wasn't present.
Also I changed things so that no-module is not explicitly
referenced.

* Remove `no-module`

Instead we allow a magic comment: `// discourse-skip-module` to prevent
the asset pipeline from creating a module.

* DEV: Enable babel transpilation based on directory

If it's in `app/assets/javascripts/dicourse` it will be transpiled
even without the `.es6` extension.

* REFACTOR: Remove Tilt/ES6ModuleTranspiler
2020-03-11 09:43:55 -04:00
fd4ce6ab8f DEV: hbs extensions are misleading in this case (#9170)
This would also prevent any linting tool to attempt to lint this incorrectly.
2020-03-11 14:42:14 +01:00
d1474e94a1 FEATURE: Allow themes to specify modifiers in their about.json file (#9097)
There are three modifiers:
- serialize_topic_excerpts (boolean)
- csp_extensions (array of strings)
- svg_icons (array of strings)

When multiple themes are active, the values will be combined. The combination method varies based on the setting. CSP/SVG arrays will be combined. serialize_topic_excerpts will use `Enumerable#any`.
2020-03-11 13:30:45 +00:00
0754c7c404 FIX: Various fixes to support posts with no user (#8877)
* Do not grant badges for posts with no user
* Ensure instructions are correct in Change Owner modal
* Hide user-dependent actions from posts with no user
* Make PostRevisor work with posts with no user
* Ensure posts with no user can be deleted
* discourse-narrative-bot should ignore posts with no user
* Skip TopicLink creation for posts with no user
2020-03-11 14:03:20 +02:00
6fdb4c33a6 DEV: popperjs 2.0.6 (#9171) 2020-03-11 10:34:58 +01:00
683cb28099 DEV: enforces ember-template-lint: no-triple-curlies (#9165)
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior.

Also introduces an htmlSafe computed macro:

```
import { htmlSafe } from "discourse/lib/computed";

htmlDescription: htmlSafe("description")
```

Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
2020-03-11 09:23:10 +01:00
1f34f653bf FIX: last ip address could point at wrong ip
Due to unicorn env object recycling request.ip could point at the wrong
ip address by the time defer block is called. This usually would happen
under load.

This also avoids keeping the entire request object as referenced by the
closure.
2020-03-11 17:42:56 +11:00
23de188f89 Update README to reflect current supported Ruby version 2020-03-11 07:13:08 +05:30
e848d98782 FIX: ensures category exists for hideParent in categoryBadgeHTML (#9161) 2020-03-11 00:58:46 +01:00
4e5dd4105c DEV: Fix flaky signed_url_for_path spec
AWS gem uses internally `Time.now` to generate the presigned URLs, so often two consecutive calls with the same params would give different results.
2020-03-10 23:22:26 +01:00
6fb4c333b0 FIX: Throw error when removing a user from group fails (#9162)
This commit ensures that an error is thrown when a user fails to be
removed from a group instead of silently failing.

This means when using the api you will receive a 400 instead of a 200 if
there is a failure. The remove group endpoint allows the removal of
multiple users, this change means that if you try to delete 10 users,
but 1 of them fails you will receive a 400 instead of 200 even though
the other 9 were removed successfully. Rather than adding a bunch more
complexity I think this is more than adequate for most use cases.
2020-03-10 15:25:00 -06:00
29b35aa64c DEV: Improve flaky time-sensitive specs (#9141) 2020-03-10 22:13:17 +01:00
f795c1b8e8 Revert "DEV: enforces ember-template-lint: no-triple-curlies (#9150)"
This reverts commit d436b600fba4cea846a5e96c235c507441965e05.

Triple curlies are still necessary for some raw templates.
2020-03-10 15:00:12 -03:00
74acbad505 FIX: don't break the private key when writing it out during theme import
* when importing a private theme using the themes:install rake task the SSH key is written out to a file for use by the git-clone command
* if the private key is written out without a newline at end-of-file (i.e. after it's been stripped) it's not recognized as a valid key by SSH
* so: don't strip it when writing it out, we should be fine
2020-03-10 13:20:11 -04:00
3f2c0b42fe FIX: throttles topic tracking shortcut and enforces topic id (#9159) 2020-03-10 17:17:54 +01:00
d436b600fb DEV: enforces ember-template-lint: no-triple-curlies (#9150)
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior.

Also introduces an htmlSafe computed macro:

```
import { htmlSafe } from "discourse/lib/computed";

htmlDescription: htmlSafe("description")
```

Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
2020-03-10 16:46:57 +01:00
aec26ad2f0 FIX: Preserve TopicCreator's timestamp resolution (#9158)
Continuation of #9140 (e35bc8b). It's the last piece required for #9141.
2020-03-10 15:35:40 +01:00
08b992d257 Build(deps): Bump aws-sdk-sns from 1.21.0 to 1.22.0 (#9154)
Bumps [aws-sdk-sns](https://github.com/aws/aws-sdk-ruby) from 1.21.0 to 1.22.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-sns/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/1.21.0...1.22.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-10 10:20:34 -04:00
25b74e252b Build(deps): Bump aws-sdk-s3 from 1.60.2 to 1.61.0 (#9153)
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.60.2 to 1.61.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/compare/v1.60.2...v1.61.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-10 10:14:52 -04:00
68328d2d64 DEV: Replace save-button partial with a component (#9066) 2020-03-10 09:37:54 -04:00
e69b6379ad FEATURE: Broader support for post uploads in video markup (#9152)
Ensures URLs in the following HTML attributes are included in post uploads:
- video poster
- source src
- track src
2020-03-10 09:01:40 -04:00
826b4793c0 FEATURE: Approve suspect users is now true by default. The suspect users list was removed (#9151) 2020-03-10 08:56:42 -03:00
020c1b9cf3 FIX: correctly checks if component is in modal (#9157) 2020-03-10 12:22:56 +01:00
78a6b76310 FIX: ensures pinned-options header is showing correct state (#9156) 2020-03-10 09:56:55 +01:00
e3bbcb27d0 FIX: Set current user timezone when saving profile timezone (#9155)
If you are changing your own profile timezone, then on save we set the current user timezone, in case this property needs to be accessed again before the user is reloaded.
2020-03-10 16:57:14 +10:00
218d3f5f44 Add tests for /srv/status behavior 2020-03-09 14:06:13 -07:00
055cb55872 DEV: shutdown_ok parameter to /srv/status
This allows probers to distinguish between liveness and readiness conditions
2020-03-09 14:06:13 -07:00
ec21a15fa7 FIX: Incorrect message when logging in via email
If `hide email address taken` was true, it would always display a
success message, rather than the non-comittal "maybe we emailed that
user" response.
2020-03-09 12:54:33 -04:00
3ad5cb0cbc FIX: Error message for 403 when featuring topic on profile (#9149) 2020-03-09 11:41:07 -05:00
5037b80c9c Merge imports from the same module (#9144) 2020-03-09 17:38:37 +01:00
e35bc8bebd FIX: Preserve PostCreator's created_at resolution (#9140)
PostMover passes to PostCreator a `created_at` that is a `ActiveSupport::WithTimeZone` instance (and also `is_a? Time`). Previously it was always being passed through `Time.zone.parse` so it would lose sub-second information. Now, it takes `Time` input as-is, while still parsing other types.
2020-03-09 17:38:13 +01:00
85e03a7f68 DEV: Replace Time.new with Time.now (#9142)
(or `Time.zone.now`)
2020-03-09 17:37:49 +01:00
fff0e0980d FEATURE: Improve keyboard shortcuts help modal (#9143) 2020-03-09 17:37:32 +01:00
ae3220fb88 FIX: Use bio_excerpt when checking for presence (#9148)
When `enable_new_user_card_route` is enabled, only `bio_excerpt` is serialized for user cards. `bio_cooked` is only loaded on the main user route.
2020-03-09 15:20:00 +00:00
174764be25 FEATURE: Add embed_set_canonical_url setting (#9134) 2020-03-09 09:31:24 -05:00
f1bb1db354 DEV: enforces ember-template-lint: no-unbound (#9147)
From ember-template-lint documentation (https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-unbound.md):

```
{{unbound}} is a legacy hold over from the days in which Ember's template engine was less performant. Its use today is vestigial, and it no longer offers performance benefits.

It is also a poor practice to use it for rendering only the initial value of a property that may later change.
```

Co-Authored-By: Jarek Radosz <jradosz@gmail.com>
2020-03-09 15:28:31 +01:00
345ac6cb67 FIX: removes legacy refreshQueryWithoutTransition (#9145)
This was causing the history state from period query params to get messedup when going back.
2020-03-09 15:05:54 +01:00
4f37233208 DEV: enforces ember-template-lint: simple-unless (#9146) 2020-03-09 13:44:34 +01:00
0e752db411 DEV: Improve mbox import script
* Customizable email subject prefixes to remove "Re" and "Fwd" as well as localized prefixes.
* Configuration option for prefixes like [FOO] or (BAR) which can be replaced with tags during import.
* Bugfix: Import script might have skipped some users due to missing ORDER BY.
2020-03-09 10:26:45 +01:00