mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-07-17 06:15:20 +00:00
refactor(support): group Bouncer, Media, Setup files into subdirs
Finishes the Support/ consolidation pass: the three remaining root-level files get grouped into purpose-named subdirs, matching the shape the Pdf/, Hashids/, Update/, and Module/ subdirs took in the earlier sweep. - BouncerDefaultScope → Support/Bouncer/ (Bouncer-specific authorization scope) - CustomPathGenerator → Support/Media/ (Spatie MediaLibrary path generator — media config references it from config/media-library.php) - InstallWizardAuth → Support/Setup/ (folded into the existing Setup/ subdir alongside EnvironmentManager, FilePermissionChecker, InstallUtils, RequirementsChecker — it's install-wizard-flow state) 4 consumer files updated (AppServiceProvider, LoginController, UseInstallWizardTokenAuth middleware, config/media-library.php). app/Support/ root is now completely empty of standalone PHP files except helpers.php.
This commit is contained in:
21
app/Support/Setup/InstallWizardAuth.php
Normal file
21
app/Support/Setup/InstallWizardAuth.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support\Setup;
|
||||
|
||||
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