Commit Graph

3253 Commits

Author SHA1 Message Date
cef46ec357 Bundled output for commit 54c5c0969384f6a50489f9b1c599e3aa8ff10e24 [skip ci] 2020-02-04 22:59:03 +01:00
5788c7373e Cleanup some code and fix alert dismiss not working 2020-02-04 22:59:03 +01:00
8fdd8a1089 feat: re-add debug button/modal
Fixes #1687
2020-02-04 22:59:03 +01:00
dc31a0a076 Fix Modal width on <768px screens not occupying the whole page 2020-02-04 22:59:03 +01:00
29eb233dd1 Bundled output for commit 937354512b0f1600ccfe58af46f02ac3cbfdb169 [skip ci] 2020-02-04 22:59:03 +01:00
f6e48fa054 Update User.js
Use recommended `anonymous`, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin
2020-02-04 22:59:03 +01:00
1b5e8f221a Fix Color Thief cross origin bug
When users have external avatar urls (for instance: in a SSO environment where the avatar is provided by another domain), color thief fails to get the avatar dominant color because the canvas would be tainted. 

Following the instructions here (https://lokeshdhakar.com/projects/color-thief/ on the "Does it work if the image is hosted on another domain?"), adding an `image.crossOrigin = 'Anonymous';` solves the issue.

Tested on my forum which before suffered from a JS error and works fine (without this fix, the canvas remain in the `body` while an script error is thrown by color thief)
2020-02-04 22:59:03 +01:00
f903487ef3 Revert search performance regression
We decided it is better to have a less intelligent search (that does not
match search terms in titles) for some people than a bad-performing
search for everyone.

We will revisit the search performance topic in the next release cycle,
possibly with larger changes around indexing.

Refs #1738, #1741, #1764.
2020-02-04 22:59:03 +01:00
1da4b72eac improve queue error handling 2020-02-04 22:59:03 +01:00
55bdad55fc added return type hint to memory cache 2020-02-04 22:59:03 +01:00
b603c7b336 add type hinting to settings repository 2020-02-04 22:59:03 +01:00
a530c52fb4 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-02-04 22:59:03 +01:00
f7dc716042 added ability to re-use existing error handling stack 2020-02-04 22:59:03 +01:00
a72f87d7ee Alias 'flarum.queue.connection' to Queue contract 2020-02-04 22:59:03 +01:00
5dbe97630c Fixes #1877 Replace getIdsForUsername() with subquery instead. (#1878) 2020-02-04 22:59:03 +01:00
23709a77a2 Bundled output for commit bbd891965f927d393bffb1f5c9e9b287f2ca2d9e [skip ci] 2020-02-04 22:59:03 +01:00
29a2c247a1 Update window size (#1894)
This small change attempts to fix #1727, as i just got my eye on it and figured i could simply fix it while seeing it.
2020-02-04 22:59:03 +01:00
a7f97c14ec Bundled output for commit 7a684660e9a1854a067319c9e639defd7f7175da [skip ci] 2020-02-04 22:59:03 +01:00
8fcd62955b Enable scrollbars in login button popups (#1900)
Fixes #1716
2020-02-04 22:59:02 +01:00
618e91805f works towards #1789 by allowing event subscribing (#1810) 2020-02-04 22:59:02 +01:00
431ab9f3e8 Amend the existing rel attribute of links
...instead of overwriting. This will play more nicely with extensions.

Refs #859.
2020-02-04 22:59:02 +01:00
4f06133d75 Stop opening external links in new tabs
We accept that this may be desired by forum owners and will offer an
extension to enable this feature. By default, we will not make any
assumptions and simply adopt the web's and browsers' default behavior.

Fixes #859.
2020-02-04 22:59:02 +01:00
bf79f2474c Cleanup code from #1876
- Extract a method for email address generation
- Consistent types
- No docblocks for types where superfluous
- Tweak console output
- Don't inherit from integration test's base class in unit test
2020-02-04 22:59:02 +01:00
1b74e43cb9 Normalize Base URL during installation
- Fix base url when is appended with a script filename
- Add default base url http://flarum.local when CLI wizard used
- Remove some code duplication
- Add minor improvement to the UX when CLI wizard used
- Add tests
- Extract base url normalisation into its own value object
2020-02-04 22:59:02 +01:00
3643e2010b Change rel for external links to nofollow ugc (#1884) 2020-02-04 22:59:02 +01:00
58299edc20 added author Daniel Klabbers 2020-02-04 22:59:02 +01:00
18774e0b10 Prepare beta.10 release (#1885)
* Update Application version string to beta 10
* Add beta.10 changelog
2020-02-04 22:59:02 +01:00
86d890d043 Restore beta.9 behavior of assertCan()
In flarum/core#1854, I changed the implementation of `assertCan()` to be
more aware of the user's log-in status. I came across this when unifying
our API's response status code when actors are not authenticated or not
authorized to do something.

@luceos rightfully had to tweak this again in ea84fc4, because the
behavior changed for one of the few API endpoints that checked for a
permission that even guests can have.

It turns out having this complex behavior in `assertCan()` is quite
misleading, because the name suggests a simple permission check and
nothing more.

Where we actually want to differ between HTTP 401 and 403, we can do
this using two method calls, and enforce it with our tests.

If this turns out to be problematic or extremely common, we can revisit
this and introduce a method with a different, better name in the future.

This commit restores the method's behavior in the last release, so we
also avoid another breaking change for extensions.
2020-02-04 22:59:02 +01:00
ab0ba707e7 Add a test for viewUserList guest permission
This test would have failed without commit ea84fc4. Next, I will revert
that commit and most of my PR #1854, so we need this test to ensure the
API continues to behave as desired.
2020-02-04 22:59:02 +01:00
04b2cf4462 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-02-04 22:59:02 +01:00
28e3ec4014 Convert more controller tests to feature tests 2020-02-04 22:59:02 +01:00
a6decb2350 Update vulnerable JS dependencies 2020-02-04 22:59:02 +01:00
1e55361539 Send a HTTP 401 for incorrect login credentials
This fixes a regression from #1843 and #1854. Now, the frontend again
shows the proper "Incorrect login details" message instead of "You
do not have permission to do that".
2020-02-04 22:59:02 +01:00
e80f5429d0 Convert another controller test to feature test
Decouple from implementation, test closer to HTTP...
2020-02-04 22:59:02 +01:00
108a23c1eb Bundled output for commit a9557c399a61dfe24c33d65dcba46ee576ff4b69 [skip ci] 2020-02-04 22:58:49 +01:00
1dd329982a Fix errors caused by deletion alert when deleting users (#1883)
Refs #1788

TypeError: t.showDeletionAlert is not a function
  at onSuccess(./src/forum/utils/UserControls.js:104:12)

Also, don't override 'this' param with user object for editAction
2020-02-04 22:58:49 +01:00
e0c2ef5e64 moved the artisan binary override and commented some of the bindings for queue 2020-02-04 22:58:49 +01:00
d654517c91 Bundled output for commit 119831e51c2b5d59102893d7c8944656e94980fd [skip ci] 2020-02-04 22:58:49 +01:00
0232d949e9 Fixes an issue where deleting a nonexistent model would error instead of resolving gracefully 2020-02-04 22:58:49 +01:00
6363753d0f prevent constant to be duplicated during tests 2020-02-04 22:58:49 +01:00
0918b04fe2 Apply fixes from StyleCI
[ci skip] [skip ci]
2020-02-04 22:58:49 +01:00
929d7b87c1 Fixes an issue where permission checks aren't made for guest users,
due to the gate being accessed after the check whether the user
is registered/signed in.
2020-02-04 22:58:49 +01:00
544f687cf4 Fixes the queue listen command. We might need to rectify this implementation before stable. 2020-02-04 22:58:49 +01:00
a7ed625d16 Fixes an issue where a different cache driver is used and Formatter
attempts to load the s9e Renderer from the wrong cache. It has
to be saved locally so that it can be properly loaded using
the spl auto register functionality.
2020-02-04 22:58:49 +01:00
a67eca0c9e Fix instructions in PR template 2020-02-04 22:58:49 +01:00
855dd2445a Bundled output for commit 24964b94bf8435f3201974de6ff57284cff511f6 [skip ci] 2020-02-04 22:58:49 +01:00
1a3d955b4f Mark notification as read without visiting discussion (#1874) 2020-02-04 22:58:48 +01:00
8db91e3395 Bundled output for commit 2e647cdda8e23cc3c95ad8c834839349de602dc1 [skip ci] 2020-02-04 22:58:48 +01:00
d725012a84 Fix error thrown if textarea doesn't exist in TextEditor (#1852)
* Prevent textarea not existing from causing errors to be thrown

* Replace [0] with .length
2020-02-04 22:58:48 +01:00
5a03cd865a listen and restart currently fail in the queue, see #1879 2020-02-04 22:58:48 +01:00