mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 01:14:03 +00:00
minor fixes
This commit is contained in:
parent
f9f9e1814a
commit
d98229d8ed
1 changed files with 3 additions and 3 deletions
|
|
@ -542,7 +542,7 @@ test('table rls manager generates relationship trees with tables related to the
|
||||||
]);
|
]);
|
||||||
})->with([true, false]);
|
})->with([true, false]);
|
||||||
|
|
||||||
test('table owner sees all the records when forceRls is false while other users only see records scoped to them', function(bool $forceRls) {
|
test('table owner sees all the records when forceRls is false while other users only see records scoped to them', function (bool $forceRls) {
|
||||||
CreateUserWithRLSPolicies::$forceRls = $forceRls;
|
CreateUserWithRLSPolicies::$forceRls = $forceRls;
|
||||||
|
|
||||||
// Drop all tables created in beforeEach
|
// Drop all tables created in beforeEach
|
||||||
|
|
@ -766,13 +766,13 @@ test('table manager ignores recursive relationship if the foreign key responsibl
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(fn () => app(TableRLSManager::class)->generateTrees())->not()->toThrow(RecursiveRelationshipException::class);
|
expect(fn () => app(TableRLSManager::class)->generateTrees())->not()->toThrow(RecursiveRelationshipException::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
function createPostgresUser(string $username, string $password = 'password'): array
|
function createPostgresUser(string $username, string $password = 'password'): array
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
DB::statement("DROP OWNED BY {$username};");
|
DB::statement("DROP OWNED BY {$username};");
|
||||||
} catch (\Throwable $th) {}
|
} catch (\Throwable) {}
|
||||||
|
|
||||||
DB::statement("DROP USER IF EXISTS {$username};");
|
DB::statement("DROP USER IF EXISTS {$username};");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue