mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Add role permission for health page (#878)
This commit is contained in:
parent
7f37b3b099
commit
448fe41e78
@ -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 [
|
||||
|
@ -97,7 +97,7 @@ class RoleResource extends Resource
|
||||
$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()
|
||||
|
@ -33,6 +33,9 @@ class Role extends BaseRole
|
||||
'view',
|
||||
'update',
|
||||
],
|
||||
'health' => [
|
||||
'view',
|
||||
],
|
||||
'activity' => [
|
||||
'seeIps',
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user