28 lines
817 B
PHP
28 lines
817 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\ProviderConnectionResource\Pages;
|
|
|
|
use App\Filament\Resources\ProviderConnectionResource;
|
|
use App\Support\Auth\Capabilities;
|
|
use App\Support\Rbac\UiEnforcement;
|
|
use Filament\Actions;
|
|
use Filament\Resources\Pages\ListRecords;
|
|
|
|
class ListProviderConnections extends ListRecords
|
|
{
|
|
protected static string $resource = ProviderConnectionResource::class;
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
UiEnforcement::forAction(
|
|
Actions\CreateAction::make()
|
|
->authorize(fn (): bool => true)
|
|
)
|
|
->requireCapability(Capabilities::PROVIDER_MANAGE)
|
|
->tooltip('You do not have permission to create provider connections.')
|
|
->apply(),
|
|
];
|
|
}
|
|
}
|