示例#1
0
        private void CheckUserPermission()
        {
            var helper = new UserPermissionHelper(User.Identity);

            if (helper.UserIsLogged == false)
            {
                Response.Redirect("/Account/Login.aspx");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var helper = new UserPermissionHelper(User.Identity);

            if (helper.UserHasAdminMode == false)
            {
                Response.Redirect("/Store/NoPermission.aspx");
            }
        }