using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using NP.Model; using NP.Base.Auth; using NP.Base.ENUM; namespace NP.BO.Controllers { //[Authorize] //[AFilter(Roles = new EMRole[] { EMRole.SysAdmin, EMRole.Admin })] [AFilter] public class BOBaseController : NP.Base.BaseController { protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); ViewBag.isadmin = SUserInfo.IsAdmin; ViewBag.issysadmin = SUserInfo.IsSysAdmin; ViewBag.issubadmin = SUserInfo.IsSubAdmin; ViewBag.issiteadmin = SUserInfo.IsSiteAdmin; ViewBag.ckmainlmenu = CookieGet("leftmenutoggle", "0"); ViewBag.Menus = GetMENUS.Where(w => w.usertype == base.SUserInfo.UserType).ToList(); ViewBag.IsSubAdmin96 = SUserInfo.IsSubAdmin96; ViewBag.IsSubAdmin97 = SUserInfo.IsSubAdmin97; //로그인을 위해서 다 https로 돌림 if (!Request.IsSecureConnection && GetConfig("usessl") == "Y") { filterContext.Result = new RedirectResult("https://" + Request.Url.Host + Request.Url.PathAndQuery); } } } }