正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -67,10 +67,8 @@ class LoginAuthMiddleware | @@ -67,10 +67,8 @@ class LoginAuthMiddleware | ||
| 67 | public function viewOperateAuth($groupInfo,$action){ | 67 | public function viewOperateAuth($groupInfo,$action){ |
| 68 | $menuModel = new Menu(); | 68 | $menuModel = new Menu(); |
| 69 | $menu_id = $menuModel->read(['route_name'=>$action],['id']); | 69 | $menu_id = $menuModel->read(['route_name'=>$action],['id']); |
| 70 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($menu_id, true) . PHP_EOL, FILE_APPEND); | ||
| 71 | if($menu_id !== false){ | 70 | if($menu_id !== false){ |
| 72 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export(stripos(','.$groupInfo['rights'].',', ','.$menu_id['id'].','), true) . PHP_EOL, FILE_APPEND); | ||
| 73 | - if(strpos(','.$groupInfo['rights'].',', ','.$menu_id['id'].',') < 0){ | 71 | + if(strpos(','.$groupInfo['rights'].',', ','.$menu_id['id'].',') === false){ |
| 74 | return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户没有权限']); | 72 | return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户没有权限']); |
| 75 | } | 73 | } |
| 76 | } | 74 | } |
-
请 注册 或 登录 后发表评论