NIHVIVO-1363 restrict the SparqlQueryServlet to only DBA users.
This commit is contained in:
parent
1ac2d7c65f
commit
fc1754db3c
2 changed files with 2 additions and 6 deletions
|
@ -44,6 +44,7 @@ import com.hp.hpl.jena.rdf.model.Resource;
|
||||||
import com.hp.hpl.jena.sparql.resultset.ResultSetFormat;
|
import com.hp.hpl.jena.sparql.resultset.ResultSetFormat;
|
||||||
import com.hp.hpl.jena.vocabulary.XSD;
|
import com.hp.hpl.jena.vocabulary.XSD;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vedit.beans.LoginStatusBean;
|
||||||
import edu.cornell.mannlib.vedit.controller.BaseEditController;
|
import edu.cornell.mannlib.vedit.controller.BaseEditController;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Ontology;
|
import edu.cornell.mannlib.vitro.webapp.beans.Ontology;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
||||||
|
@ -102,11 +103,7 @@ public class SparqlQueryServlet extends BaseEditController {
|
||||||
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException, IOException
|
throws ServletException, IOException
|
||||||
{
|
{
|
||||||
super.doGet(request, response);
|
if( !checkLoginStatus(request, response, LoginStatusBean.DBA) ) {
|
||||||
// rjy7 Allows any editor (including self-editors) access to this servlet.
|
|
||||||
// This servlet is now requested via Ajax from some custom forms, so anyone
|
|
||||||
// using the custom form needs access rights.
|
|
||||||
if( !checkLoginStatus(request, response) ) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.query.DataSource;
|
|
||||||
import com.hp.hpl.jena.query.Dataset;
|
import com.hp.hpl.jena.query.Dataset;
|
||||||
import com.hp.hpl.jena.query.DatasetFactory;
|
import com.hp.hpl.jena.query.DatasetFactory;
|
||||||
import com.hp.hpl.jena.query.Query;
|
import com.hp.hpl.jena.query.Query;
|
||||||
|
|
Loading…
Add table
Reference in a new issue