Commit Graph

34839 Commits

Author SHA1 Message Date
Robin Ward 2c0efac25e FIX: Broken certificates 2019-10-24 12:39:58 -04:00
Gerhard Schlager 85c08b84a5 DEV: Add a short wait to smoke test to prevent rate limiting 2019-10-24 18:36:27 +02:00
Gerhard Schlager d4d2cb124c DEV: Make smoke tests more reliable 2019-10-24 17:51:48 +02:00
Gerhard Schlager 452d541b74 DEV: Add env variable to allow easier debugging of smoke tests
Set `DEBUG_NODE=1` when running `rake smoke:test` and use your favorite tool to debug the smoke tests. See https://nodejs.org/en/docs/guides/debugging-getting-started/ for more information.

The debugger will break at the beginning of the smoke tests when the env variable is set.
2019-10-24 17:48:15 +02:00
Gerhard Schlager decbc9194d DEV: Fix basic auth in smoke test 2019-10-24 17:43:26 +02:00
Gerhard Schlager e4718f1910 DEV: Update puppeteer 2019-10-24 17:41:40 +02:00
Mark VanLandingham 9592ab57e0
FIX: failing build with prettier (#8241) 2019-10-24 10:16:12 -05:00
Mark VanLandingham da5e9af10a
FEATURE: Add remembering topic list for group pms (#8235)
* FEATURE: Add remembering topic list for group pms

* added findOrResetCachedBy helper in topic-list

* Created cached-topic-list.js

* Update app/assets/javascripts/discourse/routes/build-private-messages-route.js.es6

Co-Authored-By: Robin Ward <robin.ward@gmail.com>
2019-10-24 09:27:03 -05:00
David Taylor f5d6236ad2 DEV: Use `before_all` to run code before prefabrication
Followup to e9897d295f
2019-10-24 12:27:40 +01:00
Bianca Nenciu 690db4fd36
FIX: Show poll voters in Oneboxed posts. (#7768) 2019-10-24 14:00:25 +03:00
David Taylor e9897d295f DEV: Refactor user search spec to use prefabrication
Break up single large example into multiple examples, using fab! to maintain performance. On my machine, this speeds up the test slightly, and also makes it more readable.
2019-10-24 11:58:33 +01:00
Arpit Jalan b3cd83460b FIX: check for presence of liked post before creating notification 2019-10-24 14:25:56 +05:30
Krzysztof Kotlarek b8688c4af7
FIX: Rubocop rule on restorer spec (#8238) 2019-10-24 12:03:27 +11:00
Krzysztof Kotlarek f530378df3 FIX: Restore for non-multisite is not raising an error on reconnect step (#8237)
That commit introduced a bug to the system: f69dacf979

Restore works fine for multisite, however, stopped working for non-multisite.

Reason for that was that `establish_connection` method got a check if the multisite instance is available:
```
    def self.instance
      @instance
    end

    def self.establish_connection(opts)
      @instance.establish_connection(opts) if @instance
    end
```
However, the reload method don't have that check
```
    def self.reload
      @instance = new(instance.config_filename)
    end
```

To solve it, let's ensure we are in a multisite environment before call reload
2019-10-24 11:46:22 +11:00
Neil Lalonde cfe26eb301 FIX: backwards compatibility for uncompiled email style css 2019-10-23 19:22:33 -04:00
Vinoth Kannan 40254bae1b FIX: Do not load group members when user can't see it. 2019-10-24 01:57:29 +05:30
Neil Lalonde f061aee818 FEATURE: support SCSS in custom email style
In the CSS tab of Admin > Customize > Email Style, SCSS can now be used.
2019-10-23 15:42:37 -04:00
Vinoth Kannan 0dcb4bef20 FIX: should not disable topic inputs while creating new topic.
31577b2131
2019-10-24 01:04:37 +05:30
Vinoth Kannan 726bf37a12 FEATURE: wiki editors are allowed edit tags for wiki topics.
If a wiki editor's TL is greater than 'min trust level to tag topics' site setting then they can edit the tags for any wiki topic.
2019-10-23 23:50:10 +05:30
Vinoth Kannan 31577b2131 FEATURE: wiki editors are allowed edit tags for wiki topics.
If a wiki editor's TL is greater than 'min trust level to tag topics' site setting then they can edit the tags for any wiki topic.
2019-10-23 23:35:38 +05:30
Robin Ward 9347108f02 Support for importing jQuery
Also remove Ember.Qunit error about Ember.$ for now
2019-10-23 13:25:25 -04:00
Robin Ward 39159ad5e4 FIX: Wizard tests were broken with new loader 2019-10-23 13:15:28 -04:00
Robin Ward 391db25665 FIX: Sortable controller var conflict 2019-10-23 13:08:41 -04:00
Robin Ward 6287eccb35 REFACTOR: Remove `Ember.Controller` in favor of import 2019-10-23 13:06:54 -04:00
Robin Ward e18af18fec Support and examples for `Ember.Object` and `Ember.Controller` imports
We should stop using global variables and instead import these as
needed.
2019-10-23 12:55:11 -04:00
Robin Ward 0b37a3c235 Additioning Linting fixes 2019-10-23 12:41:58 -04:00
Robin Ward dd3ace5c77 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
Robin Ward a8a76198b1 REFACTOR: Remove `Ember.Component` global variable
Use imports instead.
2019-10-23 12:30:52 -04:00
Joffrey JAFFEUX 3db61aa18a
UX: applies correct background to <select> on dark themes (#8234) 2019-10-23 17:10:10 +02:00
Penar Musaraj 4fa1ef0945 UX: Improve quoting on iOS
Fixes quote usability on iOS when the button is near the right edge of the screen.
2019-10-23 10:44:47 -04:00
Dan Ungureanu a7301c8671 PERF: Add index on group to category_groups (#8231) 2019-10-23 10:30:43 +01:00
Dan Ungureanu 09a569aaba PERF: Add unique index oauth2_user_infos(user_id, provider) (#8230) 2019-10-23 10:27:56 +01:00
Daniel Waterworth 1a72a61822 FIX: Fixed testsuite
The backup restorer tests weren't cleaning up after themselves and
playing poorly with prefabrication.
2019-10-23 09:43:05 +01:00
Krzysztof Kotlarek f34a0141c7 FIX: Correct path to ImportExport module (#8227)
During the move from Classic autoloader to Zeitwerk import_export module was moved to correct file name convention.
427d54b2b0 (diff-d896ec33b95afb7fae9f8bfe73d0580b)

Problem is that export/import is still using old path to require that module

Meta: https://meta.discourse.org/t/topic-and-category-export-import/38930/40
2019-10-23 17:27:14 +11:00
Krzysztof Kotlarek f69dacf979 FIX: Reconnect in restore process connects to correct DB (#8218)
Simplified flow of restore is like that
```
migrate_database
reconnect
extract_uploads
```

Problem with incorrect current database started with this fix https://github.com/discourse/discourse/commit/025d4ee91f4

Dump task is reconnecting to default database https://github.com/rails/rails/blob/master/activerecord/lib/active_record/railties/databases.rake#L429

And then, we are trying to reconnect to the original database with that code:
```
def reconnect_database
  log "Reconnecting to the database..."
  RailsMultisite::ConnectionManagement::establish_connection(db: @current_db)
end
```

This reconnect is not switching us back to correct database because of that check
https://github.com/discourse/rails_multisite/blob/master/lib/rails_multisite/connection_management.rb#L181
Basically, it finds existing handler and it thinks that we are connected to correct DB and this step can be skipped.

To solve it, we can reload RailsMultisite::ConnectionManagement which creates a new instance of that class
https://github.com/discourse/rails_multisite/blob/master/lib/rails_multisite/connection_management.rb#L38
2019-10-23 17:23:50 +11:00
Sam Saffron 950da34826 DEV: waiting for 10ms is hardly enough
tests that test thread behavior and rely on scheduling need to allow for
a wider amount of error margin
2019-10-23 16:18:41 +11:00
Sam Saffron 676c432b0f FIX: notifications are missing under certain conditions
This simplifies the code for refreshing notification counts. It now
unconditionally looks up the user object which protects against stale objects
in memory.

This also removes a pile of conditional logic we no longer need.
2019-10-23 16:09:55 +11:00
Penar Musaraj ab6a540fc4 UX: fixes regression with iOS composer
Fixes a bug introduced in e83c2488a2 where dismissing the keyboard in iOS would not minimize the composer.
2019-10-22 23:10:18 -04:00
Kris 67ad8fbd1b minor button styling for admin login 2019-10-22 16:45:23 -04:00
Kris d4f1e6d11b UX: update disabled dropdowns style w/ color variables 2019-10-22 16:32:24 -04:00
Penar Musaraj 2ab6a68629 UX: Standardize tag display in search menu results
This allows theme components (like discourse-tag-icons) to apply to tag results in search menu.
2019-10-22 14:19:24 -04:00
Arpit Jalan 1e9d9d9346
FIX: respect `tl3 links no follow` setting (#8232) 2019-10-22 22:41:04 +05:30
Gerhard Schlager 51ecbeef4d DEV: Upgrade lefthook
`yarn install` didn't work on a fresh system
2019-10-22 18:00:20 +02:00
romanrizzi a411806551 FIX: Return blank avatar when downloading an avatar is not possible due to file size 2019-10-22 12:05:36 -03:00
romanrizzi e112369bb6 FIX: Exclude image_url from web_hook_topic_view_serializer 2019-10-22 11:53:24 -03:00
Blake Erickson 7d09af7eda
FIX: Prevent null-byte searches causing 500 error (#8226)
This fix ensures that searches that contain a null byte return a 400
error instead of causing a 500 error.

For some reason from rspec we will reach the raise statement inside
of the `rescue_from ArgumentError` block, but outside of rspec it will
not execute the raise statement and so a 500 is thrown instead of
reaching the `rescue_from Discourse::InvalidParameters` block inside of
the application controller.

This fix raises Discourse::InvalidParameters directly from the search
controller instead of relying on `PG::Connection.escape_string` to
raise the `ArgumentError`.
2019-10-22 08:44:52 -06:00
Robin Ward 283a0add80
Support for importing `@ember/component` and `@ember/routing/route` (#8214)
This will allow us to take the first step in updating our modules
to be consistent with example Ember code and to align with Ember CLI.
2019-10-22 09:47:27 -04:00
Mark VanLandingham e5311ab645 DEV: Import DiscourseRoute rather than Discourse.Route (#8225)
* DEV: Discourse.Route -> DiscourseRoute with import

* ran prettier on all routes

* prettiered one more file
2019-10-22 09:46:10 -04:00
Arpit Jalan 12409f63a0 Bump onebox version.
- FIX: Follow redirect returns url if response code is 200
- FIX: do not resize xkcd image
2019-10-22 12:26:01 +05:30
Blake Erickson 3201613f13 FEATURE: Include image url in topic serializer
The `image_url` is already included when fetching a list of topics, and
this commit adds it to the individual topic serializer so that it is
available via the api.

See

https://meta.discourse.org/t/single-topic-api-endpoint-should-contain-image-url/131020

for more details.
2019-10-21 22:02:49 -06:00