浏览代码

新增权限校验

rdluck 4 年之前
父节点
当前提交
f0210d2435
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      controllers/user.go

+ 1 - 2
controllers/user.go

@@ -171,8 +171,6 @@ func (this *UserController) Detail() {
 				}
 				item.PermissionName = permissionStr
 			}
-			item.HasPermission = hasPermission
-
 			item.SellerName = companyItem.SellerName
 			item.SellerMobile = companyItem.Mobile
 		}
@@ -190,6 +188,7 @@ func (this *UserController) Detail() {
 			hasPermission = 2
 		}
 	}
+	item.HasPermission=hasPermission
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"