diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 5450788a8a..0dcdb13b1c 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -144,7 +144,7 @@ class Kernel extends HttpKernel // MUST be logged in // MUST have 2fa // MUST be confirmed. - // (this group includes the other Firefly middleware) + // (this group includes the other Firefly III middleware) 'user-full-auth' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, @@ -162,7 +162,7 @@ class Kernel extends HttpKernel // MUST have 2fa // MUST be confirmed. // MUST have owner role - // (this group includes the other Firefly middleware) + // (this group includes the other Firefly III middleware) 'admin' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, diff --git a/app/Http/Middleware/InstallationId.php b/app/Http/Middleware/InstallationId.php index f8c7de54c3..cbcc0e1368 100644 --- a/app/Http/Middleware/InstallationId.php +++ b/app/Http/Middleware/InstallationId.php @@ -35,19 +35,23 @@ use FireflyIII\Support\System\GeneratesInstallationId; class InstallationId { use GeneratesInstallationId; + /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param Closure $next * - * @throws FireflyException - * * @return mixed * + * @throws FireflyException + * */ public function handle($request, Closure $next) { + + + $this->generateInstallationId(); return $next($request); diff --git a/config/view.php b/config/view.php index ce48cdcf8f..65a44f441e 100644 --- a/config/view.php +++ b/config/view.php @@ -21,6 +21,13 @@ declare(strict_types=1); +// simple hack to force v2. Used for demo until next release. +$layout = env('FIREFLY_III_LAYOUT', 'v1'); +if ('v2' === $_GET['layout'] && 'demo@firefly' === env('DEMO_USERNAME')) { + $layout = 'v2'; +} + + return [ /* |-------------------------------------------------------------------------- @@ -34,7 +41,7 @@ return [ */ 'paths' => [ - realpath(base_path(sprintf('resources/views/%s', env('FIREFLY_III_LAYOUT', 'v1')))), + realpath(base_path(sprintf('resources/views/%s', $layout))), ], /* @@ -48,6 +55,6 @@ return [ | */ - 'compiled' => realpath(storage_path(sprintf('framework/views/%s', env('FIREFLY_III_LAYOUT', 'v1')))), + 'compiled' => realpath(storage_path(sprintf('framework/views/%s', $layout))), ];