public ActionResult Index(User user) { if (user.Username == "Guest") { return(View("Error", new Models.Error { Message = "User Not Loged In" })); } return(!_portletTemplateFacade.FindByName("[CUS] BCProxyLogin").AccessCheck("CANACCESS", _portalUserFacade.FindByUsername(user.Username)) ? View("Error", new Models.Error { Message = "You are not authorized for this function." }) : View("Index", new Models.Main { RequiresPassword = _requirePassword })); }
protected void Page_Load(object sender, EventArgs e) { _portletTemplateFacade = ObjectFactoryWrapper.GetInstance<IPortletTemplateFacade>(); _portletTemplate = _portletTemplateFacade.FindByName("[CUS] BCProxyLogin"); if (_portletTemplate.AccessCheck("CanAccess") && _portletTemplate.AccessCheck("CanViewSideBarControl") && HttpContext.Current.Session["ProxyLoginOriginalUser"] == null) { pnlProxyLogin.Visible = true; if (_requirePassword) pnlPassword.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { _portletTemplateFacade = ObjectFactoryWrapper.GetInstance <IPortletTemplateFacade>(); _portletTemplate = _portletTemplateFacade.FindByName("[CUS] BCProxyLogin"); if (_portletTemplate.AccessCheck("CanAccess") && _portletTemplate.AccessCheck("CanViewSideBarControl") && HttpContext.Current.Session["ProxyLoginOriginalUser"] == null) { pnlProxyLogin.Visible = true; if (_requirePassword) { pnlPassword.Visible = true; } } }