From 54944917ac093668c031a3f4b5c1e8be42ee7d13 Mon Sep 17 00:00:00 2001 From: j2blake Date: Fri, 13 May 2011 19:18:32 +0000 Subject: [PATCH] Remove inappropriate references to LoginStatusBean from JSPs. --- webapp/web/edit/dashboardPropsList.jsp | 26 ------------------- .../web/templates/edit/specific/ents_edit.jsp | 5 ++-- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/webapp/web/edit/dashboardPropsList.jsp b/webapp/web/edit/dashboardPropsList.jsp index f15dfb74c..beb449214 100644 --- a/webapp/web/edit/dashboardPropsList.jsp +++ b/webapp/web/edit/dashboardPropsList.jsp @@ -1,11 +1,6 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.SelfEditingIdentifierFactory" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseMiscellaneousEditorPages" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.KeywordProperty" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> @@ -18,30 +13,9 @@ <%@ page import="java.util.ArrayList" %> <%@ page import="org.apache.commons.logging.Log" %> <%@ page import="org.apache.commons.logging.LogFactory" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.dashboardPropsList.jsp"); %> -<% -boolean showSelfEdits=false; -boolean showCuratorEdits=false; - -IdentifierBundle ids = RequestIdentifiers.getIdBundleForRequest(request); -String editorUri = SelfEditingIdentifierFactory.getSelfEditingUri(ids); -if (editorUri != null) { - showSelfEdits=true; - log.debug("self editing active"); -} else { - log.debug("self editing inactive"); -} - -if (PolicyHelper.isAuthorizedForActions(request, new UseMiscellaneousEditorPages())) { - showCuratorEdits=true; - log.debug("curator editing active"); -} else { - log.debug("curator editing inactive"); -} -%> <%-- just moving this into page scope for easy use --%> <% diff --git a/webapp/web/templates/edit/specific/ents_edit.jsp b/webapp/web/templates/edit/specific/ents_edit.jsp index ce119b428..5fbbd47b1 100644 --- a/webapp/web/templates/edit/specific/ents_edit.jsp +++ b/webapp/web/templates/edit/specific/ents_edit.jsp @@ -8,10 +8,11 @@ version="2.0"> */ %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> +<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper" %> +<%@ page import="edu.cornell.mannlib.vitro.webapp.authrequestedAction.usepages.UseMiscellaneousEditorPages" %> <% - if (LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.EDITOR)) { + if (PolicyHelper.isAuthorizedForActions(new UseMiscellaneousEditorPages())) { request.setAttribute("isEditor", Boolean.TRUE); } %>