You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: