mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
tests
This commit is contained in:
@ -26,9 +26,9 @@ public function getTitle(): string|Htmlable
|
||||
return $this->script->name.' - Executions';
|
||||
}
|
||||
|
||||
public static function canAccess(): bool
|
||||
public function mount(): void
|
||||
{
|
||||
return auth()->user()?->can('view', get_from_route(Script::class, 'script')) ?? false;
|
||||
$this->authorize('view', $this->script);
|
||||
}
|
||||
|
||||
public function getWidgets(): array
|
||||
|
@ -60,9 +60,9 @@ public function getTable(): Table
|
||||
return $this->table
|
||||
->heading('')
|
||||
->actions([
|
||||
Action::make('view')
|
||||
Action::make('logs')
|
||||
->hiddenLabel()
|
||||
->tooltip('View')
|
||||
->tooltip('Logs')
|
||||
->icon('heroicon-o-eye')
|
||||
->authorize(fn (ScriptExecution $record) => auth()->user()->can('view', $record->serverLog))
|
||||
->modalHeading('View Log')
|
||||
|
Reference in New Issue
Block a user