Skip to content

Commit

Permalink
fix settings page permission check v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 committed Sep 18, 2024
1 parent 20aab5a commit 22442cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Filament/Pages/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private function generalSettings(): array
/** @var User $user */
$user = auth()->user();

return !$user->can('update Settings');
return !$user->can('update settings');
})
->action(fn (Set $set) => $set('TRUSTED_PROXIES', [])),
FormAction::make('cloudflare')
Expand All @@ -176,7 +176,7 @@ private function generalSettings(): array
/** @var User $user */
$user = auth()->user();

return !$user->can('update Settings');
return !$user->can('update settings');
})
->action(fn (Set $set) => $set('TRUSTED_PROXIES', [
'173.245.48.0/20',
Expand Down Expand Up @@ -257,7 +257,7 @@ private function mailSettings(): array
/** @var User $user */
$user = auth()->user();

return !$user->can('update Settings');
return !$user->can('update settings');
})
->action(function () {
try {
Expand Down Expand Up @@ -598,7 +598,7 @@ protected function getHeaderActions(): array
/** @var User $user */
$user = auth()->user();

return !$user->can('update Settings');
return !$user->can('update settings');
})
->keyBindings(['mod+s']),
];
Expand Down

0 comments on commit 22442cb

Please sign in to comment.