2020-10-12 14:39:23 +09:00
|
|
|
|
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();
|
2021-05-24 11:26:46 +09:00
|
|
|
|
ViewBag.IsSubAdmin96 = SUserInfo.IsSubAdmin96;
|
2021-07-12 13:28:28 +09:00
|
|
|
|
ViewBag.IsSubAdmin97 = SUserInfo.IsSubAdmin97;
|
2020-12-28 11:05:43 +09:00
|
|
|
|
|
|
|
|
|
|
//로그인을 위해서 다 https로 돌림
|
2021-11-11 08:43:11 +09:00
|
|
|
|
if (!Request.IsSecureConnection && GetConfig("usessl") == "Y"
|
|
|
|
|
|
&& (!Request.Url.AbsolutePath.ToUpper().StartsWith("/ACCOUNT/")))
|
2020-12-28 11:05:43 +09:00
|
|
|
|
{
|
|
|
|
|
|
filterContext.Result = new RedirectResult("https://" + Request.Url.Host + Request.Url.PathAndQuery);
|
|
|
|
|
|
}
|
2020-10-12 14:39:23 +09:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|