Skip to content

Commit e1a5cea

Browse files
committed
(fix): register Permissions hook in test setUp for explicit permission row insertion
1 parent 7e3f9bc commit e1a5cea

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/e2e/Adapter/Base.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Tests\E2E\Adapter\Scopes\SpatialTests;
1919
use Tests\E2E\Adapter\Scopes\VectorTests;
2020
use Utopia\Database\Database;
21+
use Utopia\Database\Hook\Permissions;
2122
use Utopia\Database\Hook\Relationships;
2223
use Utopia\Database\Validator\Authorization;
2324

@@ -64,6 +65,9 @@ protected function setUp(): void
6465
if ($db->getRelationshipHook() === null) {
6566
$db->addHook(new Relationships($db));
6667
}
68+
if (! $db->getAdapter()->hasPermissionHook()) {
69+
$db->addHook(new Permissions());
70+
}
6771
}
6872

6973
protected function tearDown(): void

0 commit comments

Comments
 (0)