NIHVIVO-736 Modify JSPs to use the <vitro:confirmLoginStatus> custom JSP tag.

This commit is contained in:
jeb228 2010-10-14 19:10:21 +00:00
parent 0bd050a78b
commit 66559f58ab
16 changed files with 68 additions and 110 deletions

View file

@ -2,14 +2,13 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<% <%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<vitro:confirmLoginStatus level="CURATOR" />
<%
String conceptIdStr = request.getParameter("conceptId"); String conceptIdStr = request.getParameter("conceptId");
if (conceptIdStr != null) { if (conceptIdStr != null) {

View file

@ -2,17 +2,13 @@
<%@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.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<vitro:confirmLoginStatus level="DBA" />
<% <%
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
if( request.getParameter("uri") != null ){ if( request.getParameter("uri") != null ){
%> <c:redirect url="/entity"><c:param name="uri" value="${param.uri}"/></c:redirect> <% %> <c:redirect url="/entity"><c:param name="uri" value="${param.uri}"/></c:redirect> <%
return; return;

View file

@ -1,10 +1,9 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="org.apache.log4j.*" %> <%@ page import="org.apache.log4j.*" %>
<%@ page import="java.util.*" %> <%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%-- <%--
This JSP will display all the log4j Logger objects, their This JSP will display all the log4j Logger objects, their
@ -14,11 +13,9 @@
Brian Cauros bdc34@cornell.edu Brian Cauros bdc34@cornell.edu
based on work by Volker Mentzner. --%> based on work by Volker Mentzner. --%>
<% <vitro:confirmLoginStatus level="DBA" bean="loginBean" />
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<%
try { try {
String name; String name;
Level[] levels = new Level[] Level[] levels = new Level[]

View file

@ -1,15 +1,11 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <vitro:confirmLoginStatus level="CURATOR" />
<% <%
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {
%><c:redirect url="/siteAdmin"></c:redirect><%
}
if (request.getParameter("execute") != null) { if (request.getParameter("execute") != null) {
OntModel ontModel = (OntModel) getServletContext().getAttribute(JenaBaseDao.ASSERTIONS_ONT_MODEL_ATTRIBUTE_NAME); OntModel ontModel = (OntModel) getServletContext().getAttribute(JenaBaseDao.ASSERTIONS_ONT_MODEL_ATTRIBUTE_NAME);
int results = doRemoval(ontModel); int results = doRemoval(ontModel);

View file

@ -1,15 +1,13 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<% <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { <%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<vitro:confirmLoginStatus level="CURATOR" />
<%
String resourceURIStr = request.getParameter("resourceURI"); String resourceURIStr = request.getParameter("resourceURI");
if (resourceURIStr != null) { if (resourceURIStr != null) {

View file

@ -9,10 +9,12 @@
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao"%> <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao"%>
<%@page import="java.io.InputStream"%> <%@page import="java.io.InputStream"%>
<%@page import="java.util.Properties"%> <%@page import="java.util.Properties"%>
<%@page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<vitro:confirmLoginStatus level="DBA" />
<%! <%!
@ -32,12 +34,6 @@
%> %>
<% <%
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) {
%>
<c:redirect url="<%= Controllers.LOGIN %>" />
<%
}
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
Properties sesameProperties = new Properties(); Properties sesameProperties = new Properties();

View file

@ -1,7 +1,5 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="com.hp.hpl.jena.rdf.model.*" %> <%@ page import="com.hp.hpl.jena.rdf.model.*" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
<%@ page import="java.util.Enumeration" %> <%@ page import="java.util.Enumeration" %>
@ -10,11 +8,12 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<% if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { <vitro:confirmLoginStatus level="CURATOR" />
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<%
if( request.getParameter("force") != null ){ if( request.getParameter("force") != null ){
VitroRequestPrep.forceToSelfEditing(request); VitroRequestPrep.forceToSelfEditing(request);
String netid = request.getParameter("netid"); String netid = request.getParameter("netid");

View file

@ -8,7 +8,6 @@
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ 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.RdfLiteralHash" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ 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.web.MiscWebUtils" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
@ -16,11 +15,15 @@
<%@ page import="java.util.HashMap" %> <%@ page import="java.util.HashMap" %>
<%@ page import="org.apache.commons.logging.Log" %> <%@ page import="org.apache.commons.logging.Log" %>
<%@ page import="org.apache.commons.logging.LogFactory" %> <%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<% <%
//org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp"); //org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp");
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp"); final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp");
%> %>
<vitro:confirmLoginStatus allowSelfEditing="true" />
<% <%
// Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, predicateUriJson in request // Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, predicateUriJson in request
// Also get the Individual for the subjectUri and put it in the request scope // Also get the Individual for the subjectUri and put it in the request scope
@ -39,10 +42,6 @@
final String DEFAULT_VITRO_NS_FORM = "defaultVitroNsDataPropForm.jsp"; final String DEFAULT_VITRO_NS_FORM = "defaultVitroNsDataPropForm.jsp";
final String DEFAULT_ERROR_FORM = "error.jsp"; final String DEFAULT_ERROR_FORM = "error.jsp";
if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) {
%> <c:redirect url="<%= Controllers.LOGIN %>" /> <%
}
VitroRequest vreq = new VitroRequest(request); VitroRequest vreq = new VitroRequest(request);
if( EditConfiguration.getEditKey( vreq ) == null ){ if( EditConfiguration.getEditKey( vreq ) == null ){
vreq.setAttribute("editKey",EditConfiguration.newEditKey(session)); vreq.setAttribute("editKey",EditConfiguration.newEditKey(session));

View file

@ -7,7 +7,6 @@
<%@ 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.web.MiscWebUtils" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
<%@ page import="java.util.HashMap" %> <%@ page import="java.util.HashMap" %>
@ -15,10 +14,14 @@
<%@ page import="org.apache.commons.logging.LogFactory" %> <%@ page import="org.apache.commons.logging.LogFactory" %>
<%@ page errorPage="/error.jsp" %> <%@ page errorPage="/error.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%! <%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editRequestDispatch.jsp"); public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editRequestDispatch.jsp");
%> %>
<vitro:confirmLoginStatus allowSelfEditing="true" />
<% <%
/* /*
Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request. Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request.
@ -40,11 +43,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
final String DEFAULT_ERROR_FORM = "error.jsp"; final String DEFAULT_ERROR_FORM = "error.jsp";
final String DEFAULT_ADD_INDIVIDUAL = "defaultAddMissingIndividualForm.jsp"; final String DEFAULT_ADD_INDIVIDUAL = "defaultAddMissingIndividualForm.jsp";
if (!VitroRequestPrep.isSelfEditing(request)
&& !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) {
%> <c:redirect url="<%= Controllers.LOGIN %>" /> <%
}
String editKey = (EditConfiguration.getEditKey(request) == null) String editKey = (EditConfiguration.getEditKey(request) == null)
? EditConfiguration.newEditKey(session) ? EditConfiguration.newEditKey(session)
: EditConfiguration.getEditKey(request); : EditConfiguration.getEditKey(request);

View file

@ -5,32 +5,30 @@
<%@ page import="com.hp.hpl.jena.rdf.model.Literal" %> <%@ page import="com.hp.hpl.jena.rdf.model.Literal" %>
<%@ page import="com.hp.hpl.jena.rdf.model.Property" %> <%@ page import="com.hp.hpl.jena.rdf.model.Property" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %>
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ 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.dao.WebappDaoFactory"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %>
<%@ 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.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.StandardModelSelector"%>
<%@ page import="com.hp.hpl.jena.shared.Lock"%>
<%@ page import="com.hp.hpl.jena.ontology.OntModel"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %>
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %> <%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<vitro:confirmLoginStatus allowSelfEditing="true" />
<% <%
org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("edu.cornell.mannlib.vitro.jsp.edit.forms.datapropStmtDelete"); org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("edu.cornell.mannlib.vitro.jsp.edit.forms.datapropStmtDelete");
if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) {%>
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.StandardModelSelector"%>
<%@page import="com.hp.hpl.jena.shared.Lock"%>
<%@page import="com.hp.hpl.jena.ontology.OntModel"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%><c:redirect url="<%= Controllers.LOGIN %>" />
<% }
String subjectUri = request.getParameter("subjectUri"); String subjectUri = request.getParameter("subjectUri");
String predicateUri = request.getParameter("predicateUri"); String predicateUri = request.getParameter("predicateUri");
String datapropKeyStr = request.getParameter("datapropKey"); String datapropKeyStr = request.getParameter("datapropKey");

View file

@ -7,7 +7,6 @@
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.SelfEditingIdentifierFactory"%> <%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.SelfEditingIdentifierFactory"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.RoleIdentifier"%> <%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.RoleIdentifier"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty"%>
@ -31,6 +30,9 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %> <%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<vitro:confirmLoginStatus allowSelfEditing="true" />
<%! <%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.propDelete.jsp"); public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.propDelete.jsp");
@ -48,12 +50,6 @@ public WebappDaoFactory getUnfilteredDaoFactory() {
</c:url> </c:url>
<% <%
boolean selfEditing = VitroRequestPrep.isSelfEditing(request);
boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR);
if (!selfEditing && !isLoggedIn) {%>
<c:redirect url="<%= Controllers.LOGIN %>" />
<% }
String subjectUri = request.getParameter("subjectUri"); String subjectUri = request.getParameter("subjectUri");
String predicateUri = request.getParameter("predicateUri"); String predicateUri = request.getParameter("predicateUri");
String objectUri = request.getParameter("objectUri"); String objectUri = request.getParameter("objectUri");

View file

@ -5,7 +5,6 @@
<%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.hp.hpl.jena.shared.Lock" %>
<%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.XStream" %>
<%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ 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.dao.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
@ -25,6 +24,7 @@
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty"%> <%@page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%-- <%--
Current stop gap solution for back button problems Current stop gap solution for back button problems
@ -41,11 +41,10 @@ and set a flag in the request to indicate "back button confusion"
<% <%
log.debug("Starting datapropertyBackButtonProblems.jsp"); log.debug("Starting datapropertyBackButtonProblems.jsp");
%> %>
<%
if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<vitro:confirmLoginStatus level="CURATOR" allowSelfEditing="true" />
<%
List<String> errorMessages = new ArrayList<String>(); List<String> errorMessages = new ArrayList<String>();
Object sessionOntModel = request.getSession().getAttribute("jenaOntModel"); Object sessionOntModel = request.getSession().getAttribute("jenaOntModel");
OntModel jenaOntModel = (sessionOntModel != null && sessionOntModel instanceof OntModel) ? (OntModel)sessionOntModel: OntModel jenaOntModel = (sessionOntModel != null && sessionOntModel instanceof OntModel) ? (OntModel)sessionOntModel:

View file

@ -9,7 +9,6 @@
<%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.hp.hpl.jena.shared.Lock" %>
<%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.XStream" %>
<%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ 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.EditN3Generator" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Generator" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %>
@ -39,6 +38,7 @@
<%@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.jena.DependentResourceDeleteJena"%> <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%-- N3 based deletion. <%-- N3 based deletion.
@ -48,13 +48,10 @@
build the assertions graph and remove that from the system model. build the assertions graph and remove that from the system model.
--%> --%>
<%
boolean selfEditing = VitroRequestPrep.isSelfEditing(request);
boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR);
if (!selfEditing && !isLoggedIn) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
<vitro:confirmLoginStatus allowSelfEditing="true" />
<%
/* the post parameters seem to get consumed by the parsing so /* the post parameters seem to get consumed by the parsing so
* we have to make a copy. */ * we have to make a copy. */
Map <String,String[]> queryParameters = null; Map <String,String[]> queryParameters = null;

View file

@ -5,7 +5,6 @@
<%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.hp.hpl.jena.shared.Lock" %>
<%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.XStream" %>
<%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %>
<%@ 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.dao.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
@ -31,6 +30,7 @@
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%> <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%-- 2nd prototype of processing, adapted for data property editing <%-- 2nd prototype of processing, adapted for data property editing
@ -65,15 +65,12 @@ and set a flag in the request to indicate "back button confusion"
final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.processDatapropRdfForm.jsp"); final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.processDatapropRdfForm.jsp");
%> %>
<vitro:confirmLoginStatus allowSelfEditing="true" />
<% <%
log.debug("Starting processDatapropRdfForm.jsp"); log.debug("Starting processDatapropRdfForm.jsp");
boolean selfEditing = VitroRequestPrep.isSelfEditing(request);
boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR);
if (!selfEditing && !isLoggedIn) {
%><c:redirect url="<%= Controllers.LOGIN %>" /><%
}
List<String> errorMessages = new ArrayList<String>(); List<String> errorMessages = new ArrayList<String>();
//Object sessionOntModel = request.getSession().getAttribute("jenaOntModel"); //Object sessionOntModel = request.getSession().getAttribute("jenaOntModel");

View file

@ -9,7 +9,6 @@
<%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.hp.hpl.jena.shared.Lock" %>
<%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.XStream" %>
<%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %>
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %>
<%@ 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.EditN3Generator" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Generator" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %>
@ -42,8 +41,14 @@
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.ModelChangePreprocessor"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.ModelChangePreprocessor"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="java.net.URLDecoder" %> <%@ page import="java.net.URLDecoder" %>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.InsertException"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%-- 2nd prototype of processing. <%-- 2nd prototype of processing.
@ -53,20 +58,10 @@ be processed as n3 by Jena then it is an error in processing the form.
The optional n3 blocks will proccessed if their variables are bound and The optional n3 blocks will proccessed if their variables are bound and
are well formed. are well formed.
--%> --%>
<%
boolean selfEditing = VitroRequestPrep.isSelfEditing(request);
boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR);
if (!selfEditing && !isLoggedIn) {
%>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%> <vitro:confirmLoginStatus allowSelfEditing="true" />
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
<%@page import="edu.cornell.mannlib.vitro.webapp.dao.InsertException"%><c:redirect url="<%= Controllers.LOGIN %>" />
<%
}
<%
VitroRequest vreq = new VitroRequest(request); VitroRequest vreq = new VitroRequest(request);
WebappDaoFactory wdf = vreq.getWebappDaoFactory(); WebappDaoFactory wdf = vreq.getWebappDaoFactory();

View file

@ -3,7 +3,6 @@
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %> <%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %>
<%@ 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.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
@ -19,16 +18,15 @@
<%@ page import="java.util.Iterator" %> <%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %> <%@ page import="java.util.List" %>
<%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %> <%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %>
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
<%! <%!
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityKeywordsList.jsp"); public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityKeywordsList.jsp");
%> %>
<vitro:confirmLoginStatus level="CURATOR" />
<% <%
if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {%>
<c:redirect url="<%= Controllers.LOGIN %>" />
<%
}
Individual ent = (Individual)request.getAttribute("entity"); Individual ent = (Individual)request.getAttribute("entity");
if (ent==null) { if (ent==null) {
log.error("No incoming entity in entityKeywordsList.jsp"); log.error("No incoming entity in entityKeywordsList.jsp");