From 876292b5a092977ac84c1c1699d9f3e45b9be67d Mon Sep 17 00:00:00 2001 From: liaoxujun@qq.com <liaoxujun@qq.com> Date: 星期四, 07 九月 2023 15:29:12 +0800 Subject: [PATCH] 增加是否具有标书编辑功能权限字段,和创建权限订单逻辑 --- DocumentServiceAPI.Application/UserAndLogin/LogInController.cs | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs index c7e2d91..1b8bb16 100644 --- a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs +++ b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs @@ -76,7 +76,7 @@ case 0: throw Oops.Oh($"璐︽埛鎴栬�呭瘑鐮侀敊璇�"); case 1: - if (!needtoken) + if (!IsTokenPass) { needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID, Parma.PassWord); @@ -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