Files
coolify/app/Events/ApplicationStopFailed.php
Andras Bacsai 6f1905b7b0 fix(access): enforce member grants on more actions
- Require write access on the target environment to clone or move a resource
- Check read access on shared variables before a reference is added or resolved
- Limit team credentials, git sources, and imports of other backups to team-wide writers
- Require the delete level for backup, volume, storage, and task deletes
- Require create access for previews, new projects, and git sources
- Use the token team for the access scope, and check team-wide access on Livewire updates
- Require instance admin to toggle the API and MCP server
- Hide server pickers and broadcast details from members without access
2026-10-30 16:11:10 +01:00

42 lines
1.1 KiB
PHP

<?php
namespace App\Events;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
/**
* Tells the application page that a queued stop did not stop the application.
*/
class ApplicationStopFailed implements ShouldBroadcastNow
{
use Dispatchable, SerializesModels;
public function __construct(
public int $teamId,
public string $applicationUuid,
public string $message,
) {}
public function broadcastOn(): array
{
return [new PrivateChannel("team.{$this->teamId}")];
}
/**
* The team channel also reaches members without access to the application, so only Coolify can read the data.
*
* @return array{payload: string}
*/
public function broadcastWith(): array
{
return ['payload' => encrypt([
'teamId' => $this->teamId,
'applicationUuid' => $this->applicationUuid,
'message' => $this->message,
])];
}
}