xingzai 11 miesięcy temu
rodzic
commit
a25972e091
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      controllers/yanxuan_special.go

+ 4 - 0
controllers/yanxuan_special.go

@@ -294,6 +294,10 @@ func (this *YanxuanSpecialNoLoginController) Detail() {
 		br.ErrMsg = "校验用户权限失败,Err:" + err.Error()
 		return
 	}
+	//看自己的文章时不设权限限制,不需要判断是否有研选订阅权限,都可以看。
+	if user.UserId == item.UserId {
+		havePower = true
+	}
 	var hasPermission int
 	if havePower {
 		hasPermission = 1