mirror of
https://github.com/chyzy/RSystem-MVC
synced 2024-11-26 08:10:28 +01:00
22 lines
606 B
C#
22 lines
606 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Web;
|
|||
|
using System.Web.Mvc;
|
|||
|
|
|||
|
namespace RSystem.Controllers
|
|||
|
{
|
|||
|
[AllowAnonymous]
|
|||
|
public class HomeController : Controller
|
|||
|
{
|
|||
|
// GET: Home
|
|||
|
public ActionResult Index()
|
|||
|
{
|
|||
|
if (User.IsInRole("Recruit"))
|
|||
|
return RedirectToAction("Index", "Home", new {area = "Recruit"});
|
|||
|
else if (User.IsInRole("Admin"))
|
|||
|
return RedirectToAction("Index", "Panel", new {area = "Admin"});
|
|||
|
return RedirectToAction("Login", "Account");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|