Search in sources :

Example 11 with SecurityException

use of lucee.runtime.exp.SecurityException in project Lucee by lucee.

the class XMLConfigAdmin method updateComponentLocalSearch.

public void updateComponentLocalSearch(Boolean componentLocalSearch) throws SecurityException {
    checkWriteAccess();
    boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
    if (!hasAccess)
        throw new SecurityException("no access to update component Local Search");
    Element scope = _getRootElement("component");
    scope.setAttribute("local-search", Caster.toString(componentLocalSearch, ""));
}
Also used : Element(org.w3c.dom.Element) SecurityException(lucee.runtime.exp.SecurityException)

Example 12 with SecurityException

use of lucee.runtime.exp.SecurityException in project Lucee by lucee.

the class XMLConfigAdmin method updateComponentDefaultImport.

public void updateComponentDefaultImport(String componentDefaultImport) 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.setAttribute("component-default-import", componentDefaultImport);
}
Also used : Element(org.w3c.dom.Element) SecurityException(lucee.runtime.exp.SecurityException)

Example 13 with SecurityException

use of lucee.runtime.exp.SecurityException in project Lucee by lucee.

the class XMLConfigAdmin method updateMergeFormAndUrl.

public void updateMergeFormAndUrl(Boolean merge) throws SecurityException {
    checkWriteAccess();
    boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
    if (!hasAccess)
        throw new SecurityException("no access to update scope setting");
    Element scope = _getRootElement("scope");
    scope.setAttribute("merge-url-form", Caster.toString(merge, ""));
}
Also used : Element(org.w3c.dom.Element) SecurityException(lucee.runtime.exp.SecurityException)

Example 14 with SecurityException

use of lucee.runtime.exp.SecurityException in project Lucee by lucee.

the class XMLConfigAdmin method updateScopeCascadingType.

/**
 * sets the scope cascading type
 * @param type (ServletConfigImpl.SCOPE_XYZ)
 * @throws SecurityException
 */
public void updateScopeCascadingType(String type) throws SecurityException {
    checkWriteAccess();
    boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
    if (!hasAccess)
        throw new SecurityException("no access to update scope setting");
    Element scope = _getRootElement("scope");
    if (type.equalsIgnoreCase("strict"))
        scope.setAttribute("cascading", "strict");
    else if (type.equalsIgnoreCase("small"))
        scope.setAttribute("cascading", "small");
    else if (type.equalsIgnoreCase("standard"))
        scope.setAttribute("cascading", "standard");
    else
        scope.setAttribute("cascading", "standard");
}
Also used : Element(org.w3c.dom.Element) SecurityException(lucee.runtime.exp.SecurityException)

Example 15 with SecurityException

use of lucee.runtime.exp.SecurityException in project Lucee by lucee.

the class XMLConfigAdmin method updateCustomTagLocalSearch.

public void updateCustomTagLocalSearch(boolean customTagLocalSearch) throws SecurityException {
    checkWriteAccess();
    if (!ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_CUSTOM_TAG))
        throw new SecurityException("no access to update custom tag setting");
    Element element = _getRootElement("custom-tag");
    element.setAttribute("custom-tag-local-search", Caster.toString(customTagLocalSearch));
}
Also used : Element(org.w3c.dom.Element) SecurityException(lucee.runtime.exp.SecurityException)

Aggregations

SecurityException (lucee.runtime.exp.SecurityException)91 Element (org.w3c.dom.Element)83 ExpressionException (lucee.runtime.exp.ExpressionException)14 SecurityManager (lucee.runtime.security.SecurityManager)6 ApplicationException (lucee.runtime.exp.ApplicationException)5 IOException (java.io.IOException)4 Resource (lucee.commons.io.res.Resource)2 ClassException (lucee.commons.lang.ClassException)2 PageException (lucee.runtime.exp.PageException)2 ServiceException (coldfusion.server.ServiceException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 MalformedURLException (java.net.MalformedURLException)1 UnknownHostException (java.net.UnknownHostException)1 SQLException (java.sql.SQLException)1 Entry (java.util.Map.Entry)1 lucee.aprint (lucee.aprint)1 Cache (lucee.commons.io.cache.Cache)1 FileResourceProvider (lucee.commons.io.res.type.file.FileResourceProvider)1 CacheConnection (lucee.runtime.cache.CacheConnection)1 CFXTagException (lucee.runtime.cfx.CFXTagException)1