Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonHelper.SetResponseNoCache(Response);

            CustomerManager.Logout();

            string url = SEOHelper.GetAdminAreaLoginPageUrl();

            Response.Redirect(url);
        }
Beispiel #2
0
        /// <summary>
        /// Logout customer
        /// </summary>
        private void logout()
        {
            IoC.Resolve <ICustomerService>().Logout();
            string loginURL = string.Empty;

            if (HozestERPContext.Current != null)
            {
                if (HozestERPContext.Current.IsAdmin)
                {
                    loginURL = SEOHelper.GetAdminAreaLoginPageUrl();
                }
                else
                {
                    loginURL = SEOHelper.GetLoginPageUrl();
                }
                HttpContext.Current.Response.Redirect(loginURL);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Logout customer
        /// </summary>
        private void logout()
        {
            CustomerManager.Logout();
            string loginURL = string.Empty;

            if (NopContext.Current != null)
            {
                if (NopContext.Current.IsAdmin)
                {
                    loginURL = SEOHelper.GetAdminAreaLoginPageUrl();
                }
                else
                {
                    loginURL = SEOHelper.GetLoginPageUrl();
                }
                HttpContext.Current.Response.Redirect(loginURL);
            }
        }
Beispiel #4
0
        protected override void OnPreInit(EventArgs e)
        {
            //admin user validation
            if (this.AdministratorSecurityValidationEnabled &&
                !ValidateAdministratorSecurity())
            {
                string url = SEOHelper.GetAdminAreaLoginPageUrl();
                Response.Redirect(url);
            }

            //page security validation
            if (!ValidatePageSecurity())
            {
                string url = SEOHelper.GetAdminAreaAccessDeniedUrl();
                Response.Redirect(url);
            }

            if (this.IPAddressValidationEnabled && !ValidateIP())
            {
                Response.Redirect(SEOHelper.GetAdminAreaAccessDeniedUrl());
            }
            base.OnPreInit(e);
        }