mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
2.x - php
This commit is contained in:
@ -24,6 +24,11 @@ public static function getNavigationItemActiveRoutePattern(): string
|
||||
return static::getRouteName().'*';
|
||||
}
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('viewAny', Server::class) ?? false;
|
||||
}
|
||||
|
||||
public function getWidgets(): array
|
||||
{
|
||||
return [
|
||||
@ -36,6 +41,7 @@ protected function getHeaderActions(): array
|
||||
return [
|
||||
Action::make('create')
|
||||
->label('Create a Server')
|
||||
->icon('heroicon-o-plus')
|
||||
->url(Create::getUrl())
|
||||
->authorize('create', Server::class),
|
||||
];
|
||||
|
Reference in New Issue
Block a user