Files
Andras BacsaiandClaude Opus 5.5 7c60ccda0d fix: restore config diff, error text, delete handler, webhook id and danger zone fixes
- Configuration diff: report all settings when an app has no earlier
  snapshot, so older apps show "configuration changed" again (#11430).
- DigitalOcean/Vultr: do not repeat the "API error:" prefix.
- HasSecretManager: the deleting listener returns nothing, so later
  deleting listeners still run.
- GitLab webhook: use new_public_id() like the other webhooks.
- Team danger zone: show the link and open the page only for the team owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 09:35:32 +02:00

47 lines
1.1 KiB
PHP

<?php
namespace App\Livewire\Team;
use App\Actions\Team\DeleteTeam;
use App\Models\Team;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Livewire\Component;
class DangerZone extends Component
{
use AuthorizesRequests;
public Team $team;
public function mount(): void
{
$this->team = currentTeam();
$this->authorize('delete', $this->team);
}
public function delete(): mixed
{
try {
$currentTeam = currentTeam();
$this->authorize('delete', $currentTeam);
$newTeam = app(DeleteTeam::class)->handle($currentTeam, auth()->user());
refreshSession($newTeam);
return redirect()->route('team.index');
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function refreshResources(): void
{
$this->team = Team::query()->findOrFail($this->team->id);
refreshSession($this->team);
}
public function render(): mixed
{
return view('livewire.team.danger-zone');
}
}