mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
Refactor early identification (#47)
* Make universal route logic part of tbe early ID trait * Add requstHasTenant to prevent access MW, add todo@samuel * Delete PathIdentificationManager, move the used methods appropriately * Correct and refactor code related to the deleted PathIdentificationManager class * Add docblock * Fix code style (php-cs-fixer) * refactor globalStackMiddleware() * remove todos [ci skip] * refactor routeMiddleware() * revert bool assertions * revert more changes --------- Co-authored-by: PHP CS Fixer <phpcsfixer@example.com> Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
b70cd0e531
commit
4e51cdbacb
19 changed files with 95 additions and 256 deletions
|
|
@ -74,7 +74,7 @@ test('domain identification middleware is configurable', function() {
|
|||
|
||||
config(['tenancy.identification.domain_identification_middleware' => []]);
|
||||
|
||||
expect(tenancy()->routeHasDomainIdentificationMiddleware($route))->toBeFalse();
|
||||
expect(tenancy()->routeHasMiddleware($route, config('tenancy.identification.domain_identification_middleware')))->toBeFalse();
|
||||
|
||||
// Set domain identification middleware list back to default
|
||||
config(['tenancy.identification.domain_identification_middleware' => [
|
||||
|
|
@ -83,5 +83,5 @@ test('domain identification middleware is configurable', function() {
|
|||
InitializeTenancyByDomainOrSubdomain::class,
|
||||
]]);
|
||||
|
||||
expect(tenancy()->routeHasDomainIdentificationMiddleware($route))->toBeTrue();
|
||||
expect(tenancy()->routeHasMiddleware($route, config('tenancy.identification.domain_identification_middleware')))->toBeTrue();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue