mirror of
https://gitee.com/ctexthuang/hyperf_rbac_framework_server_ctexthuang.git
synced 2025-12-25 18:17:49 +08:00
fix : common request
This commit is contained in:
@@ -45,7 +45,7 @@ class PermissionMiddleware implements MiddlewareInterface
|
||||
*/
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
$adminId = $this->getToken()?->claims()?->get(RegisteredClaims::ID) ?? 0;
|
||||
$adminId = (int) $this->getToken()?->claims()?->get(RegisteredClaims::ID) ?? 0;
|
||||
if ($adminId <= 0) throw new ErrException('账户不存在');
|
||||
|
||||
$this->adminUserInfo = $this->getAdminUserInfo($adminId);
|
||||
|
||||
Reference in New Issue
Block a user