diff --git a/app/Filament/Admin/Pages/Health.php b/app/Filament/Admin/Pages/Health.php index b58c5211ba..651883dcf7 100644 --- a/app/Filament/Admin/Pages/Health.php +++ b/app/Filament/Admin/Pages/Health.php @@ -23,6 +23,11 @@ class Health extends Page 'refresh-component' => '$refresh', ]; + public static function canAccess(): bool + { + return auth()->user()->can('view health'); + } + protected function getActions(): array { return [ diff --git a/app/Filament/Admin/Resources/RoleResource.php b/app/Filament/Admin/Resources/RoleResource.php index 86d71adb14..623811732e 100644 --- a/app/Filament/Admin/Resources/RoleResource.php +++ b/app/Filament/Admin/Resources/RoleResource.php @@ -97,7 +97,7 @@ private static function makeSection(string $model, array $options): Section $icon = ('\App\Filament\Server\Resources\\' . $model . 'Resource')::getNavigationIcon(); } - return Section::make(Str::headline(Str::plural($model))) + return Section::make(Str::headline($model)) ->columnSpan(1) ->collapsible() ->collapsed() diff --git a/app/Models/Role.php b/app/Models/Role.php index 98a1b34d29..31210e2fa9 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -33,6 +33,9 @@ class Role extends BaseRole 'view', 'update', ], + 'health' => [ + 'view', + ], 'activity' => [ 'seeIps', ],