Auth auth = method.getAnnotation(Auth.class);
if (auth == null) //没有@Auth,恩,无需过滤
return null; //返回null,就是继续下一个ActionFilter
User me = (User) actionContext.getRequest().getSession().getAttribute("me");
if (me == null)
return new ViewWrapper(new AjaxView(), Ajax.fail().setData("Not login yet!"));
if ("anonymous".equals(me.getProvider())) //默认用户? 啥授权都不允许
return new ViewWrapper(new AjaxView(), Ajax.fail().setData("anonymous can't do this!"));
if ("root".equals(me.getProvider())) {
if (log.isInfoEnabled())
log.info("Access as root , pass");
return null;
}