create(); $connection = ProviderConnection::factory()->create([ 'workspace_id' => (int) $tenant->workspace_id, 'tenant_id' => (int) $tenant->getKey(), 'provider' => 'microsoft', ]); $outsider = User::factory()->create(); $this->actingAs($outsider) ->get('/admin/provider-connections/'.$connection->getKey().'/edit') ->assertNotFound(); [$readonly] = createUserWithTenant(tenant: $tenant, role: 'readonly'); $this->actingAs($readonly) ->get('/admin/provider-connections/create?tenant_id='.(string) $tenant->external_id) ->assertForbidden(); });