Commit d744d114 by 杨昕

兼容mis_uid为空的数据

parent 879cf731
Pipeline #14723 passed with stages
in 4 minutes 30 seconds
......@@ -225,7 +225,7 @@ class UserModel extends Authenticatable
* 用户名称是有三部分组成,姓名-新账号-旧账号
*/
$user = UserModel::where('name', 'regexp', '/^.*?'.$username.'/')->first();
if (empty($user)|| !isset($user['mis_uid'])){
if (empty($user)|| !isset($user['mis_uid']) || $user['mis_uid'] == ""){
/**
* 获取mis用户基本信息
*/
......@@ -302,6 +302,7 @@ class UserModel extends Authenticatable
}
$result = self::getUserPrivilege($request,['mis_uid'=>$userid]);
if (empty($result)){
LogModel::addlog(["暂无业务权限,请联系管理员",$request->all()]);
throw new \Exception('暂无业务权限,请联系管理员',403);
......@@ -345,12 +346,13 @@ class UserModel extends Authenticatable
$catgList = MediaCategoryModel::where("status",0)->get()->toArray();
$tmp = [];
foreach ($catgList as $key => $catg){
$request->replace(array_merge($request->all(),['appid'=>$catg['media_category_id']]));
$url = getRbac($request,'api/open/check',$catg['media_category_id']);
$url = getRbac($request,'api/open/check');
$data['appid'] = $catg['media_category_id'];
$data['uid'] = $request->mis_uid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment