1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:44:02 +00:00

Create tenant storage directories in FilesystemTenancyBootstrapper (#1410)

This is because the CreateTenantStorage listener only runs when
a tenant is created, but in multi-server setups the directory may
need to be created each time a tenant is *used*, not just created.

Also changed the listeners to use TenantEvent instead of specific
events, to make it possible to use them with other events, such as
TenancyBootstrapped.

Also update permission bits in a few mkdir() calls to better scope
data to the current OS user.

Also fix a typo in CacheTenancyBootstrapper (exception message).
This commit is contained in:
Samuel Štancl 2025-11-04 21:16:39 +01:00 committed by GitHub
parent 0ef4dfd230
commit cab8ecebec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 45 additions and 7 deletions

View file

@ -56,6 +56,7 @@ test('file sessions are separated', function (bool $scopeSessions) {
if ($scopeSessions) {
expect($sessionPath())->toBe(storage_path('tenant' . $tenant->getTenantKey() . '/framework/sessions'));
expect(is_dir(storage_path('tenant' . $tenant->getTenantKey() . '/framework/sessions')))->toBeTrue();
} else {
expect($sessionPath())->toBe(storage_path('framework/sessions'));
}