NIHVIVO-736 transitioning from LoginFormBean to LoginStatusBean.
This commit is contained in:
parent
659a5b41df
commit
c2fa36316f
2 changed files with 8 additions and 11 deletions
|
@ -45,7 +45,7 @@ public class LoginStatusBean {
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attach this bean to the session.
|
* Attach this bean to the session - this means you are logged in.
|
||||||
*/
|
*/
|
||||||
public static void setBean(HttpSession session, LoginStatusBean lsb) {
|
public static void setBean(HttpSession session, LoginStatusBean lsb) {
|
||||||
session.setAttribute(ATTRIBUTE_NAME, lsb);
|
session.setAttribute(ATTRIBUTE_NAME, lsb);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClass" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClass" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %>
|
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||||
|
@ -51,16 +51,13 @@ if (entity == null){
|
||||||
throw new JspException(e);
|
throw new JspException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VitroRequestPrep.isSelfEditing(request) || LoginFormBean.loggedIn(request, LoginFormBean.NON_EDITOR) /* minimum level*/) {
|
boolean showSelfEdits = VitroRequestPrep.isSelfEditing(request);
|
||||||
request.setAttribute("showSelfEdits",Boolean.TRUE);
|
boolean showCuratorEdits = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR);
|
||||||
}%>
|
if (showSelfEdits || showCuratorEdits) {
|
||||||
<c:if test="${sessionScope.loginHandler != null &&
|
request.setAttribute("showEdits",Boolean.TRUE);
|
||||||
sessionScope.loginHandler.loginStatus == 'authenticated' &&
|
}
|
||||||
sessionScope.loginHandler.loginRole >= LoginFormBean.NON_EDITOR}">
|
%>
|
||||||
<c:set var="showCuratorEdits" value="${true}"/>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<c:set var="showEdits" value="${showSelfEdits || showCuratorEdits}" scope="request"/>
|
|
||||||
<c:set var="editingClass" value="${showEdits ? 'editing' : ''}" scope="request"/>
|
<c:set var="editingClass" value="${showEdits ? 'editing' : ''}" scope="request"/>
|
||||||
|
|
||||||
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
|
<c:set var="themeDir"><c:out value="${portalBean.themeDir}" /></c:set>
|
||||||
|
|
Loading…
Add table
Reference in a new issue