🍒 fix(Auth): 修复当业务层不存在IUserSessionExtProps扩展类时,UserManger刷新异常的问题
This commit is contained in:
parent
82a7afb711
commit
839ff78203
@ -331,7 +331,7 @@ public class SysAuthService : IDynamicApiController, ITransient
|
|||||||
UnauthorizedPermissions = unauthorizedPermissions,
|
UnauthorizedPermissions = unauthorizedPermissions,
|
||||||
DataScopeList = user.AccountType == AccountTypeEnum.SuperAdmin ? [DataScopeEnum.All] : maxDataScope,
|
DataScopeList = user.AccountType == AccountTypeEnum.SuperAdmin ? [DataScopeEnum.All] : maxDataScope,
|
||||||
AppPermissions = loginMode == LoginModeEnum.APP ? LazyHelper.GetService<SysCommonService>().Value.GetAppApiList() : null,
|
AppPermissions = loginMode == LoginModeEnum.APP ? LazyHelper.GetService<SysCommonService>().Value.GetAppApiList() : null,
|
||||||
ExtProps = App.GetServices<IUserManagerExtProps>().SelectMany(u => u.GetInitExtProps(user)).ToDictionary(u => u.Key, u => u.Value)
|
ExtProps = App.GetServices<IUserManagerExtProps>()?.SelectMany(u => u.GetInitExtProps(user)).Where(u => !string.IsNullOrWhiteSpace(u.Key)).ToDictionary(u => u.Key, u => u.Value)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user