diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/AuthorizationHelper.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/AuthorizationHelper.java index f06d8311f..30fbc1574 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/AuthorizationHelper.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/AuthorizationHelper.java @@ -8,7 +8,6 @@ import javax.servlet.http.HttpSession; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import edu.cornell.mannlib.vedit.beans.LoginFormBean; import edu.cornell.mannlib.vitro.webapp.auth.identifier.ArrayIdentifierBundle; import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; import edu.cornell.mannlib.vitro.webapp.auth.identifier.ServletIdentifierBundleFactory; @@ -18,16 +17,8 @@ import edu.cornell.mannlib.vitro.webapp.auth.policy.ServletPolicyList; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyIface; -import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.AddDataPropStmt; -import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.DropObjectPropStmt; -import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.EditObjPropStmt; -import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.freemarker.ImageUploadController; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep; public class AuthorizationHelper { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/BaseResourceBean.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/BaseResourceBean.java index 3c9a2833e..af54bc268 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/BaseResourceBean.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/beans/BaseResourceBean.java @@ -72,7 +72,7 @@ public class BaseResourceBean implements ResourceBean { if( level == LoginStatusBean.ANYBODY) // 0 return PUBLIC; if( level == LoginStatusBean.NON_EDITOR) // 1 - return PUBLIC; // no correspondence with self-editing, which does not authorize through the LoginFormBean + return PUBLIC; // no correspondence with self-editing, which does not authorize through the LoginStatusBean if( level == LoginStatusBean.EDITOR ) // 4 return EDITOR; if( level == LoginStatusBean.CURATOR ) // 5 diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java index d5161c958..419aefe81 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/edit/VclassEditController.java @@ -19,9 +19,7 @@ import com.hp.hpl.jena.vocabulary.RDF; import edu.cornell.mannlib.vedit.beans.EditProcessObject; import edu.cornell.mannlib.vedit.beans.FormObject; -import edu.cornell.mannlib.vedit.beans.LoginFormBean; import edu.cornell.mannlib.vedit.controller.BaseEditController; -import edu.cornell.mannlib.vitro.webapp.auth.policy.JenaNetidPolicy.ContextSetup; import edu.cornell.mannlib.vitro.webapp.beans.Portal; import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/jena/RDFUploadController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/jena/RDFUploadController.java index dba0bbd93..c19d2868e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/jena/RDFUploadController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/jena/RDFUploadController.java @@ -26,7 +26,6 @@ import com.hp.hpl.jena.rdf.model.ModelMaker; import com.hp.hpl.jena.shared.JenaException; import com.hp.hpl.jena.shared.Lock; -import edu.cornell.mannlib.vedit.beans.LoginFormBean; import edu.cornell.mannlib.vedit.beans.LoginStatusBean; import edu.cornell.mannlib.vedit.controller.BaseEditController; import edu.cornell.mannlib.vitro.webapp.beans.Portal; diff --git a/webapp/web/templates/browse/browseGroup.jsp b/webapp/web/templates/browse/browseGroup.jsp index cd3c24c29..55b29853e 100644 --- a/webapp/web/templates/browse/browseGroup.jsp +++ b/webapp/web/templates/browse/browseGroup.jsp @@ -7,7 +7,7 @@ <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %> <%@ page errorPage="/error.jsp"%> -<%@page import="com.hp.hpl.jena.vocabulary.OWL"%> +<%@page import="com.hp.hpl.jena.vocabulary.OWL"%> <% /*********************************************** Display Browse Results (the "Index" menu command) diff --git a/webapp/web/templates/edit/fetch/vertical.jsp b/webapp/web/templates/edit/fetch/vertical.jsp index 43199f522..ab87d1184 100644 --- a/webapp/web/templates/edit/fetch/vertical.jsp +++ b/webapp/web/templates/edit/fetch/vertical.jsp @@ -12,7 +12,6 @@ String headerStr = (String)request.getAttribute("header"); if ( headerStr == null || (!headerStr.equalsIgnoreCase("noheader")) ) { %> <% } %> - <% int rows = 0; diff --git a/webapp/web/templates/edit/specific/ents_edit.jsp b/webapp/web/templates/edit/specific/ents_edit.jsp index 39e5653aa..f498e00b6 100644 --- a/webapp/web/templates/edit/specific/ents_edit.jsp +++ b/webapp/web/templates/edit/specific/ents_edit.jsp @@ -7,14 +7,21 @@ xmlns:form="http://vitro.mannlib.cornell.edu/edit/tags" version="2.0"> */ %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> -<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %> +<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %> +<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> + +<% + if (LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.EDITOR)) { + request.setAttribute("isEditor", Boolean.TRUE); + } +%>
- - + +
diff --git a/webapp/web/templates/entity/entityKeywordsList.jsp b/webapp/web/templates/entity/entityKeywordsList.jsp index cc9645098..ff0c85459 100644 --- a/webapp/web/templates/entity/entityKeywordsList.jsp +++ b/webapp/web/templates/entity/entityKeywordsList.jsp @@ -3,7 +3,7 @@ <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %> -<%@ 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.filters.VitroRequestPrep" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> @@ -25,7 +25,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. %> <% -if (!LoginFormBean.loggedIn(request, LoginFormBean.CURATOR)) {%> +if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {%> <% } diff --git a/webapp/web/templates/entity/entityMergedPropsList.jsp b/webapp/web/templates/entity/entityMergedPropsList.jsp index febb3bcf4..b3a24e9b4 100644 --- a/webapp/web/templates/entity/entityMergedPropsList.jsp +++ b/webapp/web/templates/entity/entityMergedPropsList.jsp @@ -31,9 +31,9 @@ <%@ page import="org.apache.commons.logging.Log" %> <%@ page import="org.apache.commons.logging.LogFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %> +<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> -<%@page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%> +<%@page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%> <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityMergedPropsList.jsp"); %> @@ -41,7 +41,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. log.debug("setting showSelfEdits true");%> <% } - if (loginHandler!=null && loginHandler.getLoginStatus()=="authenticated" && Integer.parseInt(loginHandler.getLoginRole())>=loginHandler.getNonEditor()) { + if (LoginStatusBean.getBean(request).isLoggedIn()) { log.debug("setting showCuratorEdits true");%> diff --git a/webapp/web/templates/entity/entityMergedPropsListUngrouped.jsp b/webapp/web/templates/entity/entityMergedPropsListUngrouped.jsp index c89cde5ee..51f83cb84 100644 --- a/webapp/web/templates/entity/entityMergedPropsListUngrouped.jsp +++ b/webapp/web/templates/entity/entityMergedPropsListUngrouped.jsp @@ -25,7 +25,7 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VClassDao" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.VClass" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %> +<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%> <%@ page import="java.util.Collection" %> @@ -41,8 +41,6 @@ <%@ page import="org.apache.commons.logging.Log" %> <%@ page import="org.apache.commons.logging.LogFactory" %> - - <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityMergedPropsList.jsp"); %> @@ -51,7 +49,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. log.debug("setting showSelfEdits true");%> <% } - if (loginHandler!=null && loginHandler.getLoginStatus()=="authenticated" && Integer.parseInt(loginHandler.getLoginRole())>=loginHandler.getNonEditor()) { + if (LoginStatusBean.getBean(request).isLoggedIn()) { log.debug("setting showCuratorEdits true");%> <% }%>