Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class Dashboard extends BasePage
{
protected static ?string $navigationIcon = 'heroicon-o-chart-bar';

protected static ?int $navigationSort = 1;

protected static string $view = 'filament.pages.dashboard';

protected function getHeaderActions(): array
Expand Down
6 changes: 2 additions & 4 deletions app/Filament/Pages/Settings/GeneralPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ class GeneralPage extends SettingsPage

protected static string $settings = GeneralSettings::class;

public function mount(): void
public static function canAccess(): bool
{
parent::mount();

abort_unless(auth()->user()->is_admin, 403);
return auth()->user()->is_admin;
}

public static function shouldRegisterNavigation(): bool
Expand Down
6 changes: 2 additions & 4 deletions app/Filament/Pages/Settings/InfluxDbPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ class InfluxDbPage extends SettingsPage

protected static string $settings = InfluxDbSettings::class;

public function mount(): void
public static function canAccess(): bool
{
parent::mount();

abort_unless(auth()->user()->is_admin, 403);
return auth()->user()->is_admin;
}

public static function shouldRegisterNavigation(): bool
Expand Down
6 changes: 2 additions & 4 deletions app/Filament/Pages/Settings/NotificationPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ class NotificationPage extends SettingsPage

protected static string $settings = NotificationSettings::class;

public function mount(): void
public static function canAccess(): bool
{
parent::mount();

abort_unless(auth()->user()->is_admin, 403);
return auth()->user()->is_admin;
}

public static function shouldRegisterNavigation(): bool
Expand Down
6 changes: 2 additions & 4 deletions app/Filament/Pages/Settings/ThresholdsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ class ThresholdsPage extends SettingsPage

protected static string $settings = ThresholdSettings::class;

public function mount(): void
public static function canAccess(): bool
{
parent::mount();

abort_unless(auth()->user()->is_admin, 403);
return auth()->user()->is_admin;
}

public static function shouldRegisterNavigation(): bool
Expand Down
2 changes: 0 additions & 2 deletions app/Filament/Resources/ResultResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class ResultResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-table-cells';

protected static ?int $navigationSort = 2;

public static function form(Form $form): Form
{
$settings = new GeneralSettings();
Expand Down
2 changes: 0 additions & 2 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class UserResource extends Resource

protected static ?string $navigationIcon = 'heroicon-o-users';

protected static ?int $navigationSort = 3;

public static function form(Form $form): Form
{
return $form
Expand Down