Migrate permission away from Jetstream; Moved update user to REST API

This commit is contained in:
Constantin Graf
2026-05-21 23:22:09 +02:00
committed by Constantin Graf
parent 12d58ee42c
commit 5d744d70c4
27 changed files with 1190 additions and 228 deletions

View File

@@ -8,6 +8,7 @@ use App\Enums\Role;
use App\Models\Member;
use App\Models\Organization;
use App\Models\User;
use App\Service\PermissionStore;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
@@ -26,6 +27,7 @@ abstract class TestCaseWithDatabase extends TestCase
$roleName = 'custom-test-'.Str::uuid();
Jetstream::role($roleName, 'Custom Test', $permissions)
->description('Role custom for testing');
PermissionStore::registerCustomRole($roleName, $permissions);
$user = User::factory()->create();
if ($isOwner) {
$organization = Organization::factory()->withOwner($user)->create();