From a7981690ac9480ce932c9a9436e952022165e2a9 Mon Sep 17 00:00:00 2001
From: liaoxujun@qq.com <liaoxujun@qq.com>
Date: 星期五, 01 九月 2023 09:57:15 +0800
Subject: [PATCH] 加入权限认证,加入日志输出到文件

---
 DocumentServiceAPI.Application/UserAndLogin/LogInController.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
index b9c52fd..1b8bb16 100644
--- a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
+++ b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
@@ -173,6 +173,14 @@
                     if (!needtoken)
                         throw Oops.Oh($"璐︽埛鎴栬�呭瘑鐮侀敊璇�");
                 }
+
+                 var hasPermissions=   await _userService.TenderHasPermissions(Tender.TenderId);
+                if(!hasPermissions)
+                {
+                    throw Oops.Oh($"闆嗗洟鐢ㄨ处鍙凤細{Tender.ItCode}浣跨敤鏈熼檺宸茬粡杩囨湡鎴栬�呮病鏈変娇鐢ㄦ潈闄�");
+                }
+
+
                     var token = _tokenService.CreateToken(new Model.JwtInfo
                     {
                         EID = Tender.EmployeeID,

--
Gitblit v1.9.1