diff --git a/IRaCIS.Core.API/SignalRHub/UploadHub.cs b/IRaCIS.Core.API/SignalRHub/UploadHub.cs index 8df85b4e6..7fae50d7a 100644 --- a/IRaCIS.Core.API/SignalRHub/UploadHub.cs +++ b/IRaCIS.Core.API/SignalRHub/UploadHub.cs @@ -23,7 +23,7 @@ namespace IRaCIS.Core.API } [AllowAnonymous] - [EnableCors] + [DisableCors] public class UploadHub : Hub { diff --git a/IRaCIS.Core.API/Startup.cs b/IRaCIS.Core.API/Startup.cs index 97c96b374..3b185cb4f 100644 --- a/IRaCIS.Core.API/Startup.cs +++ b/IRaCIS.Core.API/Startup.cs @@ -164,15 +164,14 @@ namespace IRaCIS.Core.API app.UseForwardedHeaders(); - app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); - //响应压缩 app.UseResponseCompression(); + //app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); + //不需要 token 访问的静态文件 wwwroot css, JavaScript, and images don't require authentication. app.UseStaticFiles(); - app.UseIRacisHostStaticFileStore(env); //LogDashboard app.UseLogDashboard("/LogDashboard"); @@ -212,7 +211,10 @@ namespace IRaCIS.Core.API app.UseRouting(); - //app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); + app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); + + app.UseIRacisHostStaticFileStore(env); + app.UseAuthentication(); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index 30430c6de..b35e94be5 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application .Where( t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .SelectMany(t => t.TrialDocConfirmedUserList) - .CountAsync(t => t.ConfirmUserId == _userInfo.Id), + .CountAsync(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime !=null), TotalNeedSignSystemDocCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin ? 0 @@ -73,7 +73,7 @@ namespace IRaCIS.Core.Application : await _systemDocumentRepository .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .SelectMany(t => t.SystemDocConfirmedUserList) - .CountAsync(t => t.ConfirmUserId == _userInfo.Id), + .CountAsync(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null), TotalApprovalRequiredCount= _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM ?