update SPARQL Query Builder rule validation.
This commit is contained in:
parent
e0cc7a634b
commit
2e137e316b
5 changed files with 11 additions and 117 deletions
|
@ -56,31 +56,10 @@ public class GetAllClasses extends BaseEditController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if( !checkLoginStatus(request, response) )
|
||||||
|
return;
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
|
||||||
Object obj = vreq.getSession().getAttribute("loginHandler");
|
|
||||||
LoginFormBean loginHandler = null;
|
|
||||||
if (obj != null && obj instanceof LoginFormBean)
|
|
||||||
loginHandler = ((LoginFormBean) obj);
|
|
||||||
if (loginHandler == null
|
|
||||||
|| !"authenticated".equalsIgnoreCase(loginHandler
|
|
||||||
.getLoginStatus()) ||
|
|
||||||
// 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.
|
|
||||||
Integer.parseInt(loginHandler.getLoginRole()) < LoginFormBean.NON_EDITOR) {
|
|
||||||
HttpSession session = request.getSession(true);
|
|
||||||
|
|
||||||
session.setAttribute("postLoginRequest", vreq.getRequestURI()
|
|
||||||
+ (vreq.getQueryString() != null ? ('?' + vreq
|
|
||||||
.getQueryString()) : ""));
|
|
||||||
String redirectURL = request.getContextPath()
|
|
||||||
+ Controllers.SITE_ADMIN + "?login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// EditProcessObject epo = super.createEpo(request);
|
// EditProcessObject epo = super.createEpo(request);
|
||||||
|
|
||||||
|
|
|
@ -60,31 +60,10 @@ public class GetAllPrefix extends BaseEditController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if( !checkLoginStatus(request, response) )
|
||||||
|
return;
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
|
||||||
Object obj = vreq.getSession().getAttribute("loginHandler");
|
|
||||||
LoginFormBean loginHandler = null;
|
|
||||||
if (obj != null && obj instanceof LoginFormBean)
|
|
||||||
loginHandler = ((LoginFormBean) obj);
|
|
||||||
if (loginHandler == null
|
|
||||||
|| !"authenticated".equalsIgnoreCase(loginHandler
|
|
||||||
.getLoginStatus()) ||
|
|
||||||
// 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.
|
|
||||||
Integer.parseInt(loginHandler.getLoginRole()) < LoginFormBean.NON_EDITOR) {
|
|
||||||
HttpSession session = request.getSession(true);
|
|
||||||
|
|
||||||
session.setAttribute("postLoginRequest", vreq.getRequestURI()
|
|
||||||
+ (vreq.getQueryString() != null ? ('?' + vreq
|
|
||||||
.getQueryString()) : ""));
|
|
||||||
String redirectURL = request.getContextPath()
|
|
||||||
+ Controllers.SITE_ADMIN + "?login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// EditProcessObject epo = super.createEpo(request);
|
// EditProcessObject epo = super.createEpo(request);
|
||||||
OntologyDao daoObj = vreq.getFullWebappDaoFactory().getOntologyDao();
|
OntologyDao daoObj = vreq.getFullWebappDaoFactory().getOntologyDao();
|
||||||
|
|
|
@ -54,32 +54,11 @@ public class GetClazzDataProperties extends BaseEditController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if( !checkLoginStatus(request, response) )
|
||||||
|
return;
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
|
||||||
Object obj = vreq.getSession().getAttribute("loginHandler");
|
|
||||||
LoginFormBean loginHandler = null;
|
|
||||||
if (obj != null && obj instanceof LoginFormBean)
|
|
||||||
loginHandler = ((LoginFormBean) obj);
|
|
||||||
if (loginHandler == null
|
|
||||||
|| !"authenticated".equalsIgnoreCase(loginHandler
|
|
||||||
.getLoginStatus()) ||
|
|
||||||
// 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.
|
|
||||||
Integer.parseInt(loginHandler.getLoginRole()) < LoginFormBean.NON_EDITOR) {
|
|
||||||
HttpSession session = request.getSession(true);
|
|
||||||
|
|
||||||
session.setAttribute("postLoginRequest", vreq.getRequestURI()
|
|
||||||
+ (vreq.getQueryString() != null ? ('?' + vreq
|
|
||||||
.getQueryString()) : ""));
|
|
||||||
String redirectURL = request.getContextPath()
|
|
||||||
+ Controllers.SITE_ADMIN + "?login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String vClassURI = vreq.getParameter("vClassURI");
|
String vClassURI = vreq.getParameter("vClassURI");
|
||||||
if (vClassURI == null || vClassURI.trim().equals("")) {
|
if (vClassURI == null || vClassURI.trim().equals("")) {
|
||||||
|
|
|
@ -49,32 +49,10 @@ public class GetClazzObjectProperties extends BaseEditController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if( !checkLoginStatus(request, response) )
|
||||||
|
return;
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
|
||||||
Object obj = vreq.getSession().getAttribute("loginHandler");
|
|
||||||
LoginFormBean loginHandler = null;
|
|
||||||
if (obj != null && obj instanceof LoginFormBean)
|
|
||||||
loginHandler = ((LoginFormBean) obj);
|
|
||||||
if (loginHandler == null
|
|
||||||
|| !"authenticated".equalsIgnoreCase(loginHandler
|
|
||||||
.getLoginStatus()) ||
|
|
||||||
// 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.
|
|
||||||
Integer.parseInt(loginHandler.getLoginRole()) < LoginFormBean.NON_EDITOR) {
|
|
||||||
HttpSession session = request.getSession(true);
|
|
||||||
|
|
||||||
session.setAttribute("postLoginRequest", vreq.getRequestURI()
|
|
||||||
+ (vreq.getQueryString() != null ? ('?' + vreq
|
|
||||||
.getQueryString()) : ""));
|
|
||||||
String redirectURL = request.getContextPath()
|
|
||||||
+ Controllers.SITE_ADMIN + "?login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String vClassURI = vreq.getParameter("vClassURI");
|
String vClassURI = vreq.getParameter("vClassURI");
|
||||||
if (vClassURI == null || vClassURI.trim().equals("")) {
|
if (vClassURI == null || vClassURI.trim().equals("")) {
|
||||||
|
|
|
@ -58,31 +58,10 @@ public class GetObjectClasses extends BaseEditController {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if( !checkLoginStatus(request, response) )
|
||||||
|
return;
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
VitroRequest vreq = new VitroRequest(request);
|
||||||
|
|
||||||
Object obj = vreq.getSession().getAttribute("loginHandler");
|
|
||||||
LoginFormBean loginHandler = null;
|
|
||||||
if (obj != null && obj instanceof LoginFormBean)
|
|
||||||
loginHandler = ((LoginFormBean) obj);
|
|
||||||
if (loginHandler == null
|
|
||||||
|| !"authenticated".equalsIgnoreCase(loginHandler
|
|
||||||
.getLoginStatus()) ||
|
|
||||||
// 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.
|
|
||||||
Integer.parseInt(loginHandler.getLoginRole()) < LoginFormBean.NON_EDITOR) {
|
|
||||||
HttpSession session = request.getSession(true);
|
|
||||||
|
|
||||||
session.setAttribute("postLoginRequest", vreq.getRequestURI()
|
|
||||||
+ (vreq.getQueryString() != null ? ('?' + vreq
|
|
||||||
.getQueryString()) : ""));
|
|
||||||
String redirectURL = request.getContextPath()
|
|
||||||
+ Controllers.SITE_ADMIN + "?login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String predicate = vreq.getParameter("predicate");
|
String predicate = vreq.getParameter("predicate");
|
||||||
if (predicate == null || predicate.trim().equals("")) {
|
if (predicate == null || predicate.trim().equals("")) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue