mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:14:02 +00:00
Delete dump()
This commit is contained in:
parent
b0effa60e7
commit
6bd78b4520
2 changed files with 0 additions and 5 deletions
|
|
@ -45,7 +45,6 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tenancy()->modelBelongsToTenantIndirectly($model)) {
|
if (tenancy()->modelBelongsToTenantIndirectly($model)) {
|
||||||
dump("creating {$table}_rls_policy");
|
|
||||||
/** @phpstan-ignore-next-line */
|
/** @phpstan-ignore-next-line */
|
||||||
$parentName = $model->getRelationshipToPrimaryModel();
|
$parentName = $model->getRelationshipToPrimaryModel();
|
||||||
$parentKey = $model->$parentName()->getForeignKeyName();
|
$parentKey = $model->$parentName()->getForeignKeyName();
|
||||||
|
|
@ -63,8 +62,6 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
)
|
)
|
||||||
)");
|
)");
|
||||||
|
|
||||||
dump("{$table}_rls_policy created");
|
|
||||||
|
|
||||||
$this->enableRls($table);
|
$this->enableRls($table);
|
||||||
|
|
||||||
$this->components->info("Created RLS policy for table '$table'");
|
$this->components->info("Created RLS policy for table '$table'");
|
||||||
|
|
|
||||||
|
|
@ -162,9 +162,7 @@ test('global scope is not applied when using rls', function () {
|
||||||
|
|
||||||
test('queries are correctly scoped using RLS', function() {
|
test('queries are correctly scoped using RLS', function() {
|
||||||
// Create rls policies for tables
|
// Create rls policies for tables
|
||||||
dump('creating rls policies', tenancy()->getTenantModels());
|
|
||||||
pest()->artisan('tenants:create-rls-policies');
|
pest()->artisan('tenants:create-rls-policies');
|
||||||
dump('policies created', DB::select('select * from pg_policies'));
|
|
||||||
|
|
||||||
// Create two tenants with postgres users
|
// Create two tenants with postgres users
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue