mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Fix commonmark error.
This commit is contained in:
@@ -30,7 +30,6 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Illuminate\View\View;
|
||||
use Log;
|
||||
|
||||
@@ -93,17 +92,14 @@ class ForgotPasswordController extends Controller
|
||||
// We will send the password reset link to this user. Once we have attempted
|
||||
// to send the link, we will examine the response then see the message we
|
||||
// need to show to the user. Finally, we'll send out a proper response.
|
||||
$response = $this->broker()->sendResetLink(
|
||||
$request->only('email')
|
||||
);
|
||||
$this->broker()->sendResetLink($request->only('email'));
|
||||
|
||||
// always send the same response:
|
||||
$response = trans('firefly.forgot_password_response');
|
||||
|
||||
if ($response === Password::RESET_LINK_SENT) {
|
||||
return back()->with('status', trans($response));
|
||||
}
|
||||
|
||||
return back()->withErrors(['email' => trans($response)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show form for email recovery.
|
||||
*
|
||||
|
@@ -69,6 +69,7 @@ class RegisterController extends Controller
|
||||
if ('eloquent' !== $loginProvider || 'web' !== $authGuard) {
|
||||
throw new FireflyException('Using external identity provider. Cannot continue.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,21 +85,19 @@ class RegisterController extends Controller
|
||||
{
|
||||
// is allowed to?
|
||||
$allowRegistration = true;
|
||||
$loginProvider = config('firefly.login_provider');
|
||||
$singleUserMode = app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$userCount = User::count();
|
||||
if (true === $singleUserMode && $userCount > 0 && 'eloquent' === $loginProvider) {
|
||||
$guard = config('auth.defaults.guard');
|
||||
if (true === $singleUserMode && $userCount > 0 && 'ldap' !== $guard) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
if ('eloquent' !== $loginProvider) {
|
||||
if ('ldap' === $guard) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
if (false === $allowRegistration) {
|
||||
$message = 'Registration is currently not available.';
|
||||
|
||||
return prefixView('error', compact('message'));
|
||||
throw new FireflyException('Registration is currently not available :(');
|
||||
}
|
||||
|
||||
$this->validator($request->all())->validate();
|
||||
@@ -126,21 +125,21 @@ class RegisterController extends Controller
|
||||
public function showRegistrationForm(Request $request)
|
||||
{
|
||||
$allowRegistration = true;
|
||||
$loginProvider = config('firefly.login_provider');
|
||||
$isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
|
||||
$singleUserMode = app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$userCount = User::count();
|
||||
$pageTitle = (string)trans('firefly.register_page_title');
|
||||
$guard = config('auth.defaults.guard');
|
||||
|
||||
if (true === $isDemoSite) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
if (true === $singleUserMode && $userCount > 0 && 'eloquent' === $loginProvider) {
|
||||
if (true === $singleUserMode && $userCount > 0 && 'ldap' !== $guard) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
if ('eloquent' !== $loginProvider) {
|
||||
if ('ldap' === $guard) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
|
@@ -87,7 +87,6 @@ class ResetPasswordController extends Controller
|
||||
|
||||
return prefixView('error', compact('message'));
|
||||
}
|
||||
|
||||
$rules = [
|
||||
'token' => 'required',
|
||||
'email' => 'required|email',
|
||||
|
@@ -28,7 +28,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\Support\Search\OperatorQuerySearch;
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use League\CommonMark\Environment;
|
||||
use League\CommonMark\Environment\Environment;
|
||||
use League\CommonMark\Extension\GithubFlavoredMarkdownExtension;
|
||||
use Route;
|
||||
use Twig\Extension\AbstractExtension;
|
||||
@@ -205,6 +205,8 @@ class General extends AbstractExtension
|
||||
return new TwigFilter(
|
||||
'markdown',
|
||||
static function (string $text): string {
|
||||
|
||||
|
||||
$environment = Environment::createCommonMarkEnvironment();
|
||||
$environment->addExtension(new GithubFlavoredMarkdownExtension());
|
||||
|
||||
|
26
composer.lock
generated
26
composer.lock
generated
@@ -8017,21 +8017,21 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496"
|
||||
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
|
||||
"reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||
"reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1 || ^2 || ^3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^0.12.55",
|
||||
@@ -8061,7 +8061,7 @@
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/xdebug-handler/issues",
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/2.0.1"
|
||||
"source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8077,7 +8077,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-05T19:37:51+00:00"
|
||||
"time": "2021-07-31T17:03:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
@@ -8484,16 +8484,16 @@
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.17.0",
|
||||
"version": "v1.17.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maximebf/php-debugbar.git",
|
||||
"reference": "4ef8e359d9fffbfbce26218ee36f196453a4dd7d"
|
||||
"reference": "0a3532556be0145603f8a9de23e76dc28eed7054"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/4ef8e359d9fffbfbce26218ee36f196453a4dd7d",
|
||||
"reference": "4ef8e359d9fffbfbce26218ee36f196453a4dd7d",
|
||||
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054",
|
||||
"reference": "0a3532556be0145603f8a9de23e76dc28eed7054",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8543,9 +8543,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maximebf/php-debugbar/issues",
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.17.0"
|
||||
"source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1"
|
||||
},
|
||||
"time": "2021-07-27T05:47:57+00:00"
|
||||
"time": "2021-08-01T09:19:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
|
Reference in New Issue
Block a user