mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
Remove and recategorize todos
This commit is contained in:
parent
24797278cd
commit
33e4a8e4e2
5 changed files with 8 additions and 8 deletions
|
|
@ -32,10 +32,10 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
|||
throw new Exception('The template connection must NOT have URL defined. Specify the connection using individual parts instead of a database URL.');
|
||||
}
|
||||
|
||||
// Better debugging, but breaks cached lookup in prod
|
||||
if (app()->environment('local') || app()->environment('testing')) { // todo@docs mention this change in v4 upgrade guide https://github.com/archtechx/tenancy/pull/945#issuecomment-1268206149
|
||||
// Better debugging, but breaks cached lookup, so we disable this in prod
|
||||
if (app()->environment('local') || app()->environment('testing')) {
|
||||
$database = $tenant->database()->getName();
|
||||
if (! $tenant->database()->manager()->databaseExists($database)) { // todo@samuel does this call correctly use the host connection?
|
||||
if (! $tenant->database()->manager()->databaseExists($database)) { // todo@dbRefactor does this call correctly use the host connection?
|
||||
throw new TenantDatabaseDoesNotExistException($database);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ class DatabaseConfig
|
|||
}
|
||||
|
||||
/**
|
||||
* todo@name come up with a better name
|
||||
* todo@dbRefactor come up with a better name
|
||||
* Get database manager class from the given connection config's driver.
|
||||
*
|
||||
* @throws DatabaseManagerNotRegisteredException
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class PermissionControlledPostgreSQLSchemaManager extends PostgreSQLSchemaManage
|
|||
$tables = $this->connection()->select("SELECT table_name FROM information_schema.tables WHERE table_schema = '{$schema}' AND table_type = 'BASE TABLE'");
|
||||
|
||||
// Grant permissions to any existing tables. This is used with RLS
|
||||
// todo@samuel refactor this along with the todo in TenantDatabaseManager
|
||||
// todo@dbRefactor refactor this along with the todo in TenantDatabaseManager
|
||||
// and move the grantPermissions() call inside the condition in `ManagesPostgresUsers::createUser()`
|
||||
// but maybe moving it inside $createUser is wrong because some central user may migrate new tables
|
||||
// while the RLS user should STILL get access to those tables
|
||||
|
|
|
|||
|
|
@ -66,9 +66,11 @@ class PreventAccessFromUnwantedDomains
|
|||
return in_array($request->getHost(), config('tenancy.identification.central_domains'), true);
|
||||
}
|
||||
|
||||
// todo@samuel technically not an identification middleware but probably ok to keep this here
|
||||
public function requestHasTenant(Request $request): bool
|
||||
{
|
||||
// This middleware is special in that it's not an identification middleware
|
||||
// but still uses some logic from UsableWithEarlyIdentification, so we just
|
||||
// need to implement this method here. It doesn't matter what it returns.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ test('files can get fetched using the storage url', function() {
|
|||
test('storage_path helper does not change if suffix_storage_path is off', function() {
|
||||
$originalStoragePath = storage_path();
|
||||
|
||||
// todo@tests https://github.com/tenancy-for-laravel/v4/pull/44#issue-2228530362
|
||||
|
||||
config([
|
||||
'tenancy.bootstrappers' => [FilesystemTenancyBootstrapper::class],
|
||||
'tenancy.filesystem.suffix_storage_path' => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue