-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels