mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
- 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
42 lines
1.1 KiB
PHP
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,
|
|
])];
|
|
}
|
|
}
|