1234567891011121314151617181920212223 |
- using Microsoft.AspNetCore.Mvc;
- using ProductionLineMonitor.Core.Dtos;
- using ProductionLineMonitor.Core.Utils;
- using ProductionLineMonitor.Web.Filters;
- using System.Linq;
- using System.Security.Claims;
- namespace ProductionLineMonitor.Web.Controllers
- {
- [AuthenFilter]
- [GlobalModelValidate]
- [TypeFilter(typeof(GlobalExceptionAttribute))]
- public class BaseController : Controller
- {
- protected UserLoginResultInfoDto _userLoginInfo;
- public override ViewResult View()
- {
- string value = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.UserData).Value;
- _userLoginInfo = value.ToObject<UserLoginResultInfoDto>();
- return base.View(_userLoginInfo);
- }
- }
- }
|