Permission middleware check condition incorrect.

Author: Dennies-ChangCreated Feb 25, 2025Updated Feb 25, 2025

The condition Line 32 in src/Middleware/Permission.php is incorrect.

The code is: if (!Admin::user() || !empty($args) || $this->shouldPassThrough($request)) { return $next($request); }

However if I used as sample code, the $args will be "not empty", and the condition will be always true, and the permission check logic will never be used.

It should be corrected as: if (!Admin::user() || empty($args) || $this->shouldPassThrough($request)) { return $next($request); }

The "!" prefixed for empty($args) should be removed, would you please fix it? Thanks.

Best Regards, Dennies Chang.