Minor changes in kernel code.

This commit is contained in:
James Cole 2020-11-25 06:25:08 +01:00
parent 9a658b60fb
commit 16018109c8
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
3 changed files with 17 additions and 6 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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))),
];