NIHVIVO-736 transitioning from LoginFormBean to LoginStatusBean.
This commit is contained in:
parent
4dbf19c9c0
commit
02e32428bd
6 changed files with 30 additions and 106 deletions
|
@ -6,47 +6,21 @@
|
|||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
||||
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%><%/* this odd thing points to something in web.xml */ %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.PortalWebUtil" %>
|
||||
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session" />
|
||||
|
||||
<%
|
||||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Jon Corson-Rikert, Brian Caruso, and Brian Lowe
|
||||
*
|
||||
* UPDATES:
|
||||
* 2007-09-27 BJL moved VIVO and CALS-specific markup to VIVO clone
|
||||
* 2006-01-31 BJL edited to remove deprecated markup
|
||||
* 2005-11-06 JCR put styling on extra search selection box
|
||||
* 2005-10-25 JCR changed local ALL CALS RESEARCH constant to appBean.getSharedPortalFlagNumeric()
|
||||
* 2005-10-11 JCR tweaks to VIVO search label spacing in header
|
||||
* 2005-09-15 JCR,BDC converted to use revised ApplicationBean and PortalBean
|
||||
* 2005-08-16 JCR added CALS_IMPACT contant and modified code to use CALS display for that portal
|
||||
* 2005-08-01 JCR changed ordering of other portals being displayed to displayRank instead of appName (affects SGER, CALS portals)
|
||||
* 2005-07-05 JCR retrieving ONLY_CURRENT and ONLY_PUBLIC from database and setting in ApplicationBean
|
||||
* 2005-06-20 JCR enabling a common CALS research portal via ALL CALS RESEARCH
|
||||
* 2005-06-20 JCR removed MIN_STATUS_ID and minstatus parameter from search -- has been changed to interactive-only maxstatus parameter
|
||||
* JCR 2005-06-14 : added isInitialized() test for appBean and portalBean
|
||||
*/
|
||||
|
||||
// application variables not stored in application bean
|
||||
final int CALS_IMPACT = 6;
|
||||
final int FILTER_SECURITY_LEVEL = 4;
|
||||
final int CALS_SEARCHBOX_SIZE = 25;
|
||||
final int VIVO_SEARCHBOX_SIZE = 20;
|
||||
|
||||
HttpSession currentSession = request.getSession();
|
||||
String currentSessionIdStr = currentSession.getId();
|
||||
int securityLevel = -1;
|
||||
String loginName = null;
|
||||
if (loginHandler.testSessionLevel(request) > -1) {
|
||||
securityLevel = Integer.parseInt(loginHandler.getLoginRole());
|
||||
loginName = loginHandler.getLoginName();
|
||||
}
|
||||
LoginStatusBean loginBean = LoginStatusBean.getBean(request);
|
||||
boolean isEditor = loginBean.isLoggedInAtLeast(LoginStatusBean.EDITOR);
|
||||
String loginName = loginBean.getUsername();
|
||||
|
||||
VitroRequest vreq = new VitroRequest(request);
|
||||
ApplicationBean appBean = vreq.getAppBean();
|
||||
|
@ -106,7 +80,7 @@
|
|||
<label for="search">Search </label>
|
||||
</td>
|
||||
<td>
|
||||
<% if (securityLevel>=FILTER_SECURITY_LEVEL && appBean.isFlag1Active()) { %>
|
||||
<% if (isEditor && appBean.isFlag1Active()) { %>
|
||||
<select id="select" name="flag1" class="form-item" >
|
||||
<option value="nofiltering" selected="selected">entire database (<%=loginName%>)</option>
|
||||
<option value="<%=portal.getPortalId()%>"><%=portal.getShortHand()%></option>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue