mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-16 01:34:08 +00:00
Refactor install wizard and mail configuration
This commit is contained in:
21
app/Support/InstallWizardAuth.php
Normal file
21
app/Support/InstallWizardAuth.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class InstallWizardAuth
|
||||
{
|
||||
public const HEADER = 'X-Install-Wizard';
|
||||
|
||||
public const HEADER_VALUE = '1';
|
||||
|
||||
public const TOKEN_NAME = 'installation-wizard';
|
||||
|
||||
public const TOKEN_ABILITY = 'installation:wizard';
|
||||
|
||||
public static function isRequest(Request $request): bool
|
||||
{
|
||||
return $request->headers->get(self::HEADER) === self::HEADER_VALUE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user