在执行操作之前,我使用ActionFilter来确定用户是否有权访问特定资源,如Account对象(a la Rhino Security)。这是一个全局筛选器,如果授权值失败,它将重定向到错误页面filterContext.Controller.TempData["ErrorMessageoperation: {0}", operation);
filterContext.Result = new RedirectResult("~
在菜单栏中,有一个在单击时我想要的菜单,如果用户登录,发送Ajax请求并返回一条成功的消息,否则在模式插件中加载登录页面并让用户登录。登录页面可以在同一个页面上,不需要使用模式插件来调用远程页面。以下是伪代码: send an Ajax request to a page and show return message showphp echo $this->Html-&g