TaskService确保任务交互模块已授权Where条件调整

usertest
zhangxiaofeng 3 months ago
parent ea893e0d95
commit 173fc6e75d

@ -440,8 +440,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
protected virtual async Task<bool> EnsureModuleAuthorized() protected virtual async Task<bool> EnsureModuleAuthorized()
{ {
long tid = long.Parse(User.TenantId); long tid = long.Parse(User.TenantId);
var authStr = await Db.Queryable<SysTenantPermissionAuth>().Where(x => x.PermissionId == PERMISSION_ID && x.TenantId == tid && var authStr = await Db.Queryable<SysTenantPermissionAuth>().ClearFilter(typeof(ITenantId)).Where(x => x.PermissionId == PERMISSION_ID && x.TenantId == tid &&
SqlFunc.Subqueryable<SysPermissionTenant>().Where(spt => spt.PermissionId == x.PermissionId).Any()) SqlFunc.Subqueryable<SysPermissionTenant>().Where(spt => spt.PermissionId == x.PermissionId && spt.TenantId == tid).Any())
.Select(x => x.AuthNum).FirstAsync(); .Select(x => x.AuthNum).FirstAsync();
if (authStr.IsNullOrEmpty()) if (authStr.IsNullOrEmpty())
return false; return false;

Loading…
Cancel
Save