File tree Expand file tree Collapse file tree 7 files changed +8
-22
lines changed
Expand file tree Collapse file tree 7 files changed +8
-22
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ class Dashboard extends BasePage
2020{
2121 protected static ?string $ navigationIcon = 'heroicon-o-chart-bar ' ;
2222
23- protected static ?int $ navigationSort = 1 ;
24-
2523 protected static string $ view = 'filament.pages.dashboard ' ;
2624
2725 protected function getHeaderActions (): array
Original file line number Diff line number Diff line change @@ -26,11 +26,9 @@ class GeneralPage extends SettingsPage
2626
2727 protected static string $ settings = GeneralSettings::class;
2828
29- public function mount (): void
29+ public static function canAccess (): bool
3030 {
31- parent ::mount ();
32-
33- abort_unless (auth ()->user ()->is_admin , 403 );
31+ return auth ()->user ()->is_admin ;
3432 }
3533
3634 public static function shouldRegisterNavigation (): bool
Original file line number Diff line number Diff line change @@ -21,11 +21,9 @@ class InfluxDbPage extends SettingsPage
2121
2222 protected static string $ settings = InfluxDbSettings::class;
2323
24- public function mount (): void
24+ public static function canAccess (): bool
2525 {
26- parent ::mount ();
27-
28- abort_unless (auth ()->user ()->is_admin , 403 );
26+ return auth ()->user ()->is_admin ;
2927 }
3028
3129 public static function shouldRegisterNavigation (): bool
Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ class NotificationPage extends SettingsPage
2727
2828 protected static string $ settings = NotificationSettings::class;
2929
30- public function mount (): void
30+ public static function canAccess (): bool
3131 {
32- parent ::mount ();
33-
34- abort_unless (auth ()->user ()->is_admin , 403 );
32+ return auth ()->user ()->is_admin ;
3533 }
3634
3735 public static function shouldRegisterNavigation (): bool
Original file line number Diff line number Diff line change @@ -21,11 +21,9 @@ class ThresholdsPage extends SettingsPage
2121
2222 protected static string $ settings = ThresholdSettings::class;
2323
24- public function mount (): void
24+ public static function canAccess (): bool
2525 {
26- parent ::mount ();
27-
28- abort_unless (auth ()->user ()->is_admin , 403 );
26+ return auth ()->user ()->is_admin ;
2927 }
3028
3129 public static function shouldRegisterNavigation (): bool
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ class ResultResource extends Resource
3131
3232 protected static ?string $ navigationIcon = 'heroicon-o-table-cells ' ;
3333
34- protected static ?int $ navigationSort = 2 ;
35-
3634 public static function form (Form $ form ): Form
3735 {
3836 $ settings = new GeneralSettings ();
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ class UserResource extends Resource
2121
2222 protected static ?string $ navigationIcon = 'heroicon-o-users ' ;
2323
24- protected static ?int $ navigationSort = 3 ;
25-
2624 public static function form (Form $ form ): Form
2725 {
2826 return $ form
You can’t perform that action at this time.
0 commit comments