use of lucee.runtime.exp.SecurityException in project Lucee by lucee.
the class XMLConfigAdmin method updateErrorStatusCode.
public void updateErrorStatusCode(Boolean doStatusCode) throws SecurityException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
if (!hasAccess)
throw new SecurityException("no access to change error settings");
Element error = _getRootElement("error");
error.setAttribute("status-code", Caster.toString(doStatusCode, ""));
}
use of lucee.runtime.exp.SecurityException in project Lucee by lucee.
the class XMLConfigAdmin method updateApplicationListener.
public void updateApplicationListener(String type, String mode) throws SecurityException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
if (!hasAccess)
throw new SecurityException("no access to update listener type");
Element scope = _getRootElement("application");
scope.setAttribute("listener-type", type.toLowerCase().trim());
scope.setAttribute("listener-mode", mode.toLowerCase().trim());
}
use of lucee.runtime.exp.SecurityException in project Lucee by lucee.
the class XMLConfigAdmin method updateBaseComponent.
/**
* update the baseComponent
* @param baseComponent
* @throws SecurityException
*/
public void updateBaseComponent(String baseComponentCFML, String baseComponentLucee) throws SecurityException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
if (!hasAccess)
throw new SecurityException("no access to update component setting");
// config.resetBaseComponentPage();
Element scope = _getRootElement("component");
// if(baseComponent.trim().length()>0)
scope.removeAttribute("base");
scope.setAttribute("base-cfml", baseComponentCFML);
scope.setAttribute("base-lucee", baseComponentLucee);
}
use of lucee.runtime.exp.SecurityException in project Lucee by lucee.
the class XMLConfigAdmin method updateComponentDeepSearch.
public void updateComponentDeepSearch(Boolean deepSearch) throws SecurityException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
if (!hasAccess)
throw new SecurityException("no access to update component setting");
// config.resetBaseComponentPage();
Element scope = _getRootElement("component");
// if(baseComponent.trim().length()>0)
if (deepSearch != null)
scope.setAttribute("deep-search", Caster.toString(deepSearch.booleanValue()));
else {
if (scope.hasAttribute("deep-search"))
scope.removeAttribute("deep-search");
}
}
use of lucee.runtime.exp.SecurityException in project Lucee by lucee.
the class XMLConfigAdmin method updateErrorTemplate.
/**
* updates the ErrorTemplate
* @param template
* @throws SecurityException
*/
public void updateErrorTemplate(int statusCode, String template) throws SecurityException {
checkWriteAccess();
boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_DEBUGGING);
if (!hasAccess)
throw new SecurityException("no access to change error settings");
Element error = _getRootElement("error");
// if(template.trim().length()>0)
error.setAttribute("template-" + statusCode, template);
}
Aggregations