laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.83k stars 643 forks source link

Horizon Gate Bug 5.23. Anyone can access. #1393

Closed David-Grass-Feria closed 6 months ago

David-Grass-Feria commented 6 months ago

Horizon Version

5.23

Laravel Version

10.10

PHP Version

8.2.15

Redis Driver

Predis

Redis Version

Predis

Database Driver & Version

Mysql

Description

protected function gate(): void
    {
        Gate::define('viewHorizon', function ($user) {
            return in_array($user->id, [
                1
            ]);
        });
    }

APP_ENV=production

Steps To Reproduce

Check Gate::authorize.

driesvints commented 6 months ago

I think I just closed an issue for this. Please check out the links I shared on it and do not re-open this.