"Y".equalsIgnoreCase(userLogin.getString("hasLoggedOut")) : false);
}
protected static boolean hasBasePermission(GenericValue userLogin, HttpServletRequest request) {
ServletContext context = (ServletContext) request.getAttribute("servletContext");
Authorization authz = (Authorization) request.getAttribute("authz");
Security security = (Security) request.getAttribute("security");
String serverId = (String) context.getAttribute("_serverId");
String contextPath = request.getContextPath();
ComponentConfig.WebappInfo info = ComponentConfig.getWebAppInfo(serverId, contextPath);
if (security != null) {
if (info != null) {
for (String permission: info.getBasePermission()) {
if (!"NONE".equals(permission) && !security.hasEntityPermission(permission, "_VIEW", userLogin) &&
!authz.hasPermission(userLogin.getString("userLoginId"), permission, null)) {
return false;
}
}
} else {
Debug.logInfo("No webapp configuration found for : " + serverId + " / " + contextPath, module);