Commit Graph

2799 Commits

Author SHA1 Message Date
fcb97b256f Add migration helper to drop columns 2018-09-22 13:45:41 +09:30
4429cf4eba Merge pull request #1513 from flarum/tz/1419-restrict-own-permissions
Make "own" permissions depend on the user's ability to reply
2018-09-22 12:22:03 +09:30
c54f739484 Make "own" permissions depend on the user's ability to reply
Permission to rename/hide/edit one's own discussion/post is only granted
if the user has permission to reply to the discussion. This makes sense
if you think of these actions as forms of "replying" to a discussion.

Fixes #1419 because suspended users do not have permission to reply to
discussions, therefore they will not be granted these "own" permissions.
2018-09-22 12:15:46 +09:30
6c0d73afa0 Fix tests 2018-09-22 00:40:19 +02:00
1cd8ec6873 Display only exception messages during booting
By not letting PHP render the stack trace, we prevent displaying
sensitive information (such as the database credentials). Instead,
we display a simple line with the exception message.

In the console, the full exception can still be shown, as that is
a tool only for forum admins anyway.

Fixes #1421.
2018-09-21 23:33:28 +02:00
4ed1c7a1bb Boot Flarum app in Server classes
This is in preparation for fixing #1421 - it allows us to
encapsulate the exception handling in the server classes, so that
we can keep the skeleton (flarum/flarum) lean.
2018-09-21 23:30:14 +02:00
c67f673819 Remove references to deleted property 2018-09-21 12:29:16 +02:00
7917ce130e Bundled output for commit 2b174b17fc6af2971c6b27eefbe0688f332aa453 [skip ci] 2018-09-21 05:07:46 +00:00
2b174b17fc Fix tests 2018-09-21 14:32:41 +09:30
550d35e86f Apply fixes from StyleCI (#1574)
[ci skip] [skip ci]
2018-09-21 14:28:02 +09:30
64686ef7a9 Remove the "debug" button from request error alerts
Using the browser's console to debug failed requests is much more powerful
2018-09-21 14:27:39 +09:30
5ce702a5d0 Make registration errors still work properly when debug mode is on 2018-09-21 14:18:17 +09:30
fdf5fdbaf3 Bundled output for commit 184ffcd99116c9053e7956a3db5f5acc152fc971 [skip ci] 2018-09-21 02:30:05 +00:00
184ffcd991 Sort user discussion list properly 2018-09-21 11:55:00 +09:30
ba946237e4 Bundled output for commit 8ec0578ddfed8d2c28f5113fb3e1f6d8493a2975 [skip ci] 2018-09-21 02:09:25 +00:00
8ec0578ddf Fix installation command 2018-09-21 11:32:46 +09:30
c34fcecf03 Update TextFormatter deprecated API 2018-09-21 11:23:24 +09:30
9e487b4e41 Live output of migrator notes 2018-09-21 11:22:51 +09:30
986d811a16 Fix notifications crash
When loading notifications, $this->type was null and thus array_get
was returning an array instead of null. I assume this issue was
introduced in a Laravel version upgrade? Anyway, this fixes it.
2018-09-21 11:22:26 +09:30
c32af6559e Fix group badge misalignment if there is no group icon 2018-09-21 11:20:54 +09:30
07298e165d Use default system font instead of Open Sans 2018-09-21 11:20:17 +09:30
c15bbc9c5e Add "tiny" preset for LoadingIndicator
This is used in various places but had not been added since presets were
removed from Spin.js in a recent version upgrade.
2018-09-21 11:19:32 +09:30
6c8c525e57 Fix regression introduced by #1543
The Page component's config method wasn't being called, therefore the
bodyClass would not be applied.
2018-09-21 11:17:54 +09:30
93dfb6dec9 Revert "Frontend extender: Remove route registration"
This reverts commit 4770a5c906541aba22501723ad73ba6ee002699e.
2018-09-21 09:05:45 +09:30
750d9d05a6 Use container events as an alternative to the ConfigureMiddleware event (#1462)
By moving the DispatchRoute middleware into an `afterResolving`
callback, this will allow a new Middleware extender to add a `resolving`
callback to the appropriate container binding, removing the need for the
ConfigureMiddleware event.

The ConfigureMiddleware event has been deprecated and should be removed
in beta 9.
2018-09-16 21:21:13 +02:00
0ce289be4c Travis: Add table prefix to build matrix (#1568)
Fixes #1564.
2018-09-16 20:59:40 +02:00
7fcf556f13 Bundled output for commit 68afdd21aee3b2032aaf89052bf3951c164df01d [skip ci] 2018-09-16 18:51:11 +00:00
68afdd21ae Merge pull request #1344 from flarum/1236-database-changes
Database changes
2018-09-16 20:44:29 +02:00
5635bd26f9 Fix query error 2018-09-15 12:44:59 +09:30
622bf26510 Inline permissions migration 2018-09-15 12:40:32 +09:30
2367a45c18 Use instance variable directly instead of passing it around 2018-09-07 01:40:31 +02:00
4770a5c906 Frontend extender: Remove route registration
This can be achieved using the Route extender, which is more
flexible, as it does not necessary connect the URL with the current
frontend's router.

(Example use-case: The ext-embed frontend will be a new frontend,
however any routes using this frontend will be part of the forum
route group.)

Refs #851.
2018-09-07 01:40:31 +02:00
c61badd754 Frontend extender: Route to correct frontend
So far, we always added routes configured via this extender to the
forum frontend. Not correct.
2018-09-07 01:02:13 +02:00
14393ec53e RouteHandlerFactory: Refactor frontend parameter
By passing in just the frontend identifier, we can hide some of the
implementation details, in this case the identifier of the Frontend
instance in the IoC container.
2018-09-07 01:00:56 +02:00
96045ca390 flarum info: Try to fix STDERR redirection for Windows
See the following articles for more information:
- https://www.24k.com.sg/blog-27.html
- https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout

Refs #1562.
2018-09-07 00:25:26 +02:00
eb228dd7b9 flarum info: Extract extension table to function 2018-09-04 00:38:08 +02:00
092e5b9d23 flarum info: Tweak output styling 2018-09-04 00:32:54 +02:00
7e3980744e InfoCommand improvements (#1562)
* Ignore error output of 'git rev-parse HEAD'
* Organize extension information in a table
2018-09-04 00:24:07 +02:00
85c965afbc Use correct method from contract 2018-09-03 23:55:16 +02:00
43fc2c0952 Add 'oldUsername' to User\Event\Renamed (#1563) 2018-09-03 22:42:30 +02:00
5a9b47cdf7 Apply fixes from StyleCI (#1561)
[ci skip] [skip ci]
2018-09-01 23:35:37 +02:00
5374f8a352 flarum info: Display warning when in debug mode
Refs #1421.
2018-09-01 16:57:44 +02:00
5f5af894ab Load per-site extenders, if available
Closes #1559.
2018-09-01 16:27:52 +02:00
d7c283a48f Frontend extender: Work without extension, too 2018-09-01 16:15:02 +02:00
c5a3715701 Bundled output for commit 710c63ba6a15fb8914242b77d5fe955adbc026b3 [skip ci] 2018-08-25 10:56:59 +00:00
710c63ba6a Update JS tooling 2018-08-25 20:18:59 +09:30
5142c639c1 Rename user methods 2018-08-24 22:13:06 +09:30
eb3232dfc9 Missed a spot 2018-08-24 22:13:06 +09:30
72d46bc461 Fix up Notification model 2018-08-24 22:13:06 +09:30
9792576464 Rename notification.sender 2018-08-24 22:13:06 +09:30