patbef-Simulator/Simulator/Controllers/LoginController.cs

25 lines
676 B
C#
Raw Permalink Normal View History

2024-01-29 16:28:09 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Simulator.Controllers
{
public class LoginController : Controller
{
// GET: Login
public ActionResult Index(string password = null)
{
if((Session != null && Session["user"] != null && Session["user"] == "success" ) || (!string.IsNullOrEmpty(password) && password == "Labor-Stein2022!"))
{
Session["user"] = "success";
return RedirectToAction("Index", "Home");
}
else
{
return View();
}
}
}
}