|
@@ -383,13 +383,19 @@ func (er *EnglishReportController) Detail(c *gin.Context) {
|
|
|
var authOk bool
|
|
|
userInfo := services.GetInfoByClaims(c)
|
|
|
if userInfo.Id > 0 {
|
|
|
- // 报告权限校验
|
|
|
- ok, e := english_report_service.CheckUserReportAuthByCompanyAndClassify(int(userInfo.CompanyId), reportItem.ClassifyIdSecond)
|
|
|
- if e != nil {
|
|
|
- resp.FailMsg("获取失败", "报告权限校验失败, Err: "+e.Error(), c)
|
|
|
- return
|
|
|
+ // 正式客户, 校验权限
|
|
|
+ if userInfo.Status == 1 {
|
|
|
+ ok, e := english_report_service.CheckUserReportAuthByCompanyAndClassify(int(userInfo.CompanyId), reportItem.ClassifyIdSecond)
|
|
|
+ if e != nil {
|
|
|
+ resp.FailMsg("获取失败", "报告权限校验失败, Err: "+e.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ authOk = ok
|
|
|
+ }
|
|
|
+ // 临时客户, 可查看所有
|
|
|
+ if userInfo.Status == 2 {
|
|
|
+ authOk = true
|
|
|
}
|
|
|
- authOk = ok
|
|
|
}
|
|
|
content, subContent := ``, ``
|
|
|
if authOk {
|