public override void OnActionExecuting(ActionExecutingContext context) { db = (BullyAssureContext)context.HttpContext.RequestServices.GetService(typeof(BullyAssureContext)); //new LoggingHandler(db).AuditTrail(JsonSerializer.Serialize(context.HttpContext.Request.Form), context.HttpContext.Session.GetString("UserID"), context.HttpContext.Request.Path, context.HttpContext.Request.QueryString.ToString()); if (!AuthenticateUser(context.HttpContext.Session.GetString("UserID"), context.HttpContext.Session.GetString("token"), context.HttpContext.Request.Path).Result) { if (!String.IsNullOrEmpty(context.HttpContext.Session.GetString("UserID"))) { LogFilter.Write(db, context.HttpContext.Request.QueryString.ToString(), context.HttpContext.Request.Path, context.HttpContext.Session.GetString("UserID")); } var controller = (dynamic)context.Controller; if (!String.IsNullOrEmpty(context.HttpContext.Session.GetString("SYSTEMCONFIGURATION"))) { context.Result = controller.RedirectToAction( JsonSerializer.Deserialize <SystemConfiguration>(context.HttpContext.Session.GetString("SYSTEMCONFIGURATION")).ErrorRedirectAction ?? "LoginPage", JsonSerializer.Deserialize <SystemConfiguration>(context.HttpContext.Session.GetString("SYSTEMCONFIGURATION")).ErrorRedirectTo ?? "Login" ); } else { context.Result = controller.RedirectToAction("LoginPage", "Login"); } } }
public PedigreeFieldsViewComponent(BullyAssureContext context, IConfiguration _config) { db = context; config = _config; }
public ComponentsController(BullyAssureContext _db, IConfiguration _config) { db = _db; config = _config; }
public static void Write(BullyAssureContext _db, string QueryString, string path, string UserID, Exception ex = null) { new LoggingHandler(_db).LogError(ex, UserID, path, QueryString); }
public HomeController(BullyAssureContext _db, ILogger <HomeController> logger) { db = _db; _logger = logger; }
public LogAuditLogin(BullyAssureContext _db) { db = _db; }
public LoggingHandler(BullyAssureContext _db) { db = _db; }
public FieldTypeViewComponent(BullyAssureContext context) { db = context; }
public ErrorViewComponent(BullyAssureContext context) { db = context; }
public KennelFieldViewComponent(BullyAssureContext context) { db = context; }
public EmailHandler(BullyAssureContext _db) { db = _db; }
public CardsViewComponent(BullyAssureContext context, IConfiguration _config) { db = context; config = _config; }
public SystemSettingsViewComponent(BullyAssureContext context) { db = context; }
public BreederFieldViewComponent(BullyAssureContext context) { db = context; }
public GlobalSettingsViewComponent(BullyAssureContext context) { db = context; }
public KennelController(BullyAssureContext _db, IConfiguration _config, EmailHandler _emailHandler) { this.db = _db; this.config = _config; this.emailHandler = _emailHandler; }
public FieldController(BullyAssureContext _db, IConfiguration _config) { db = _db; config = _config; }
public MenuNavViewComponent(BullyAssureContext context) { db = context; }
public PermissionsViewComponent(BullyAssureContext context) { this.db = context; }