Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<%
	//initialize the theme
	String theme;
	com.ideasoft.cs.ClientRestrictions cr = csClient.getClientRestrictions();
	if (cr.isUserInRole("Manager")) {
		theme = "red";
	} else if (cr.isUserInRole("User")) {
		theme = "blue";
	} else {
		theme = csApplication.getContext().getProperty("ideasoft.themes.defaultTheme", "red");
	}
	session.setAttribute(THEME_SESSION_ATTRIBUTE, theme);
	session.setAttribute(THEME_PATH_SESSION_ATTRIBUTE, "/themes/" + theme);
%>

Ocultar el link de Logout Según el Rol del Usuario

Realizar las siguientes modificaciones en los archivos header.jsp y desktopHeader.tag:

Buscar el siguiente bloque de código:

Code Block
title<O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/header.jsp

			&nbsp;|&nbsp;
			<a href="<%=request.getContextPath()%>/logout.jsp" target="_top" class="header"><fmt:message key="header.logout" bundle="${lang}"/></a>

y reemplazar por:

Code Block
title<O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/header.jsp

<%
    boolean canEditBookmarks = csClient.isLoginOk() && csClient.getClientRestrictions().isUserInRole("Manager");
%>
<% if (canEditBookmarks) { %>
			&nbsp;|&nbsp;
			<a href="<%=request.getContextPath()%>/logout.jsp" target="_top" class="header"><fmt:message key="header.logout" bundle="${lang}"/></a>
<% } %>

Buscar:

Code Block
title<O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/WEB-INF/tags/o3/desktopHeader.tag

						&nbsp;|&nbsp;
						<a href="javascript:logout()" class="xtabOn"><fmt:message key="jtabs.logout" bundle="${lang_jdesktop}"/></a>

y reemplazar por:

Code Block
title<O3>/jboss/server/default/deploy/gserver/0o3.ear/o3portal.war/WEB-INF/tags/o3/desktopHeader.tag

<jsp:useBean id="csClient" scope="session" type="com.ideasoft.cs.ejb.web.CSClientBean"/>
<%
    boolean canEditBookmarks = csClient.isLoginOk() && csClient.getClientRestrictions().isUserInRole("Manager");
%>
<%  if (canEditBookmarks) { %>
						&nbsp;|&nbsp;
						<a href="javascript:logout()" class="xtabOn"><fmt:message key="jtabs.logout" bundle="${lang_jdesktop}"/></a>
<% } %>