From 6bd78b452045f2abb1c970312ae70156e22111ef Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 15 Jun 2023 13:52:18 +0200 Subject: [PATCH] Delete `dump()` --- src/Commands/CreateRLSPoliciesForTenantTables.php | 3 --- tests/PostgresRLSTest.php | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 05aeb132..af41c351 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -45,7 +45,6 @@ class CreateRLSPoliciesForTenantTables extends Command } if (tenancy()->modelBelongsToTenantIndirectly($model)) { - dump("creating {$table}_rls_policy"); /** @phpstan-ignore-next-line */ $parentName = $model->getRelationshipToPrimaryModel(); $parentKey = $model->$parentName()->getForeignKeyName(); @@ -63,8 +62,6 @@ class CreateRLSPoliciesForTenantTables extends Command ) )"); - dump("{$table}_rls_policy created"); - $this->enableRls($table); $this->components->info("Created RLS policy for table '$table'"); diff --git a/tests/PostgresRLSTest.php b/tests/PostgresRLSTest.php index f33f7d66..3e257c0d 100644 --- a/tests/PostgresRLSTest.php +++ b/tests/PostgresRLSTest.php @@ -162,9 +162,7 @@ test('global scope is not applied when using rls', function () { test('queries are correctly scoped using RLS', function() { // Create rls policies for tables - dump('creating rls policies', tenancy()->getTenantModels()); pest()->artisan('tenants:create-rls-policies'); - dump('policies created', DB::select('select * from pg_policies')); // Create two tenants with postgres users $tenant = Tenant::create();