public boolean start(Writer writer) {
String resource = (String) parameters.get("resource");
if (StringUtils.isEmpty(resource)) {
return true;
} else {
AuthorityManager authorityManager = (AuthorityManager) stack
.findValue("authorityManager");
return authorityManager.isAuthorized(SecurityContextHolder.getContext()
.getAuthentication(), resource);
}
}