@Override public String getRole() { return oldDecorator.getRole(); }
/** Retrieve Decorator named in 'name' attribute. Checks the role if specified. */ public Decorator getNamedDecorator(HttpServletRequest request, String name) { Decorator result = null; try { result = configLoader.getDecoratorByName(name); } catch (ServletException e) { e.printStackTrace(); } if (result == null || (result.getRole() != null && !request.isUserInRole(result.getRole()))) { // if the result is null or the user is not in the role return super.getNamedDecorator(request, name); } else { return result; } } }