From 72a4c19e0f052310aa4ac5e442d62ccbc6833b7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 02:15:02 +0000 Subject: [PATCH 1/2] chore(deps): bump ramsey/composer-install from 2 to 3 Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](https://github.com/ramsey/composer-install/compare/v2...v3) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/phpstan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index cc069e1..4f3f936 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -20,7 +20,7 @@ jobs: coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github From f0db5a3be524bd1018dd134ba931c982a9f0d1f5 Mon Sep 17 00:00:00 2001 From: Adam Weston Date: Wed, 13 Mar 2024 08:56:42 -0400 Subject: [PATCH 2/2] Fix: check authorization at the page level --- src/FilamentLaravelLogPlugin.php | 4 ---- src/Pages/ViewLog.php | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/FilamentLaravelLogPlugin.php b/src/FilamentLaravelLogPlugin.php index fb4b6c5..13b9021 100644 --- a/src/FilamentLaravelLogPlugin.php +++ b/src/FilamentLaravelLogPlugin.php @@ -47,10 +47,6 @@ public static function get(): static public function register(Panel $panel): void { - if (! $this->isAuthorized()) { - return; - } - $panel ->pages([ $this->viewLog, diff --git a/src/Pages/ViewLog.php b/src/Pages/ViewLog.php index f6b4310..db279a9 100644 --- a/src/Pages/ViewLog.php +++ b/src/Pages/ViewLog.php @@ -114,4 +114,9 @@ public function getTitle(): string { return __('log::filament-laravel-log.page.title'); } + + public static function canAccess(): bool + { + return FilamentLaravelLogPlugin::get()->isAuthorized(); + } }