} catch (UnknownHostException e) {
throw new InternalException(e);
}
throw new UnauthorizedException();
}
UserRole role = user.getRole();
String roleCode = role.getCode();
if (roleCode.equals(UserRole.VIEWER)) {
if (pathInfo.startsWith("/reports/")
&& pathInfo.endsWith("/output/")
&& (method.equals(HttpMethod.GET) || method
.equals(HttpMethod.HEAD))) {