Search in sources :

Example 1 with Password

use of lucee.runtime.config.Password in project Lucee by lucee.

the class Admin method doGetDefaultPassword.

/**
 * @throws PageException
 */
private void doGetDefaultPassword() throws PageException {
    Password password = admin.getDefaultPassword();
    pageContext.setVariable(getString("admin", action, "returnVariable"), password == null ? "" : password.getPassword());
}
Also used : Password(lucee.runtime.config.Password)

Example 2 with Password

use of lucee.runtime.config.Password in project Lucee by lucee.

the class SecurityManagerImpl method checkFileLocation.

@Override
public void checkFileLocation(ConfigWeb cw, Resource res, String strServerPassword) throws SecurityException {
    if (res == null || !(res.getResourceProvider() instanceof FileResourceProvider)) {
        return;
    }
    cw = (ConfigWeb) ThreadLocalPageContext.getConfig(cw);
    Password serverPassword = PasswordImpl.passwordToCompare(cw, true, strServerPassword);
    // All
    if (getAccess(TYPE_FILE) == VALUE_ALL)
        return;
    // Local
    if (getAccess(TYPE_FILE) == VALUE_LOCAL) {
        res = ResourceUtil.getCanonicalResourceEL(res);
        // local
        if (rootDirectory != null)
            if (ResourceUtil.isChildOf(res, rootDirectory))
                return;
        // custom
        if (!ArrayUtil.isEmpty(customFileAccess)) {
            for (int i = 0; i < customFileAccess.length; i++) {
                if (ResourceUtil.isChildOf(res, customFileAccess[i]))
                    return;
            }
        }
        if (isValid(cw, serverPassword) || isAdminContext())
            return;
        throw new SecurityException(createExceptionMessage(res, true), "access is prohibited by security manager");
    }
    // None
    if (isValid(cw, serverPassword))
        return;
    // custom
    if (!ArrayUtil.isEmpty(customFileAccess)) {
        res = ResourceUtil.getCanonicalResourceEL(res);
        for (int i = 0; i < customFileAccess.length; i++) {
            if (ResourceUtil.isChildOf(res, customFileAccess[i]))
                return;
        }
    }
    if (isAdminContext())
        return;
    throw new SecurityException(createExceptionMessage(res, false), "access is prohibited by security manager");
}
Also used : FileResourceProvider(lucee.commons.io.res.type.file.FileResourceProvider) SecurityException(lucee.runtime.exp.SecurityException) Password(lucee.runtime.config.Password)

Example 3 with Password

use of lucee.runtime.config.Password in project Lucee by lucee.

the class CacheRegionNew method _call.

static String _call(PageContext pc, String cacheName, Struct properties, Boolean throwOnError, String strWebAdminPassword) throws PageException {
    Password webAdminPassword = CacheUtil.getPassword(pc, strWebAdminPassword, false);
    try {
        // TODO why we have here EHCache?
        XMLConfigAdmin adminConfig = XMLConfigAdmin.newInstance((ConfigWebImpl) pc.getConfig(), webAdminPassword);
        adminConfig.updateCacheConnection(cacheName, new ClassDefinitionImpl("org.lucee.extension.cache.eh.EHCache", null, null, pc.getConfig().getIdentification()), Config.CACHE_TYPE_NONE, properties, false, false);
        adminConfig.storeAndReload();
    } catch (Exception e) {
        if (throwOnError)
            throw Caster.toPageException(e);
    }
    return null;
}
Also used : ClassDefinitionImpl(lucee.transformer.library.ClassDefinitionImpl) XMLConfigAdmin(lucee.runtime.config.XMLConfigAdmin) FunctionException(lucee.runtime.exp.FunctionException) PageException(lucee.runtime.exp.PageException) Password(lucee.runtime.config.Password)

Example 4 with Password

use of lucee.runtime.config.Password in project Lucee by lucee.

the class RestDeleteApplication method call.

public static String call(PageContext pc, String dirPath, String strWebAdminPassword) throws PageException {
    Password webAdminPassword = CacheUtil.getPassword(pc, strWebAdminPassword, false);
    Resource dir = RestDeleteApplication.toResource(pc, dirPath);
    ConfigWebImpl config = (ConfigWebImpl) pc.getConfig();
    try {
        XMLConfigAdmin admin = XMLConfigAdmin.newInstance((ConfigWebImpl) pc.getConfig(), webAdminPassword);
        Mapping[] mappings = config.getRestMappings();
        Mapping mapping;
        for (int i = 0; i < mappings.length; i++) {
            mapping = mappings[i];
            if (RestUtil.isMatch(pc, mapping, dir)) {
                admin.removeRestMapping(mapping.getVirtual());
                admin.storeAndReload();
            }
        }
    } catch (Exception e) {
        throw Caster.toPageException(e);
    }
    return null;
}
Also used : ConfigWebImpl(lucee.runtime.config.ConfigWebImpl) Resource(lucee.commons.io.res.Resource) Mapping(lucee.runtime.rest.Mapping) XMLConfigAdmin(lucee.runtime.config.XMLConfigAdmin) FunctionException(lucee.runtime.exp.FunctionException) PageException(lucee.runtime.exp.PageException) Password(lucee.runtime.config.Password)

Example 5 with Password

use of lucee.runtime.config.Password in project Lucee by lucee.

the class Admin method _doStartTag.

/**
 * @throws PageException
 */
private void _doStartTag() throws PageException, IOException {
    config = (ConfigImpl) pageContext.getConfig();
    // getToken
    if (action.equals("gettoken")) {
        doGetToken();
        return;
    }
    // schedule
    if (action.equals("schedule")) {
        doTagSchedule();
        return;
    }
    // search
    if (action.equals("collection")) {
        doTagCollection();
        return;
    }
    // index
    if (action.equals("index")) {
        doTagIndex();
        return;
    }
    // cluster
    if (action.equals("setcluster")) {
        doSetCluster();
        return;
    }
    if (action.equals("getcluster")) {
        doGetCluster();
        return;
    }
    if (check("hashpassword", ACCESS_FREE)) {
        String raw = getString("admin", action, "pw");
        Password pw = PasswordImpl.passwordToCompare(pageContext.getConfig(), type != TYPE_WEB, raw);
        Password changed = ((ConfigWebImpl) pageContext.getConfig()).updatePasswordIfNecessary(type == TYPE_SERVER, raw);
        if (changed != null)
            pw = changed;
        pageContext.setVariable(getString("admin", action, "returnVariable"), pw.getPassword());
        // do not remove
        return;
    }
    try {
        // Password
        String strPW = getString("password", "");
        // hash password if
        Password tmp = type == TYPE_SERVER ? ((ConfigWebImpl) config).isServerPasswordEqual(strPW) : config.isPasswordEqual(strPW);
        // compatibility)
        if (tmp != null)
            password = tmp;
        else
            password = null;
        // Config
        if (type == TYPE_SERVER)
            config = (ConfigImpl) pageContext.getConfig().getConfigServer(password);
        adminSync = config.getAdminSync();
        admin = XMLConfigAdmin.newInstance(config, password);
    } catch (Exception e) {
        throw Caster.toPageException(e);
    }
    if (check("connect", ACCESS_FREE)) {
        ConfigWebUtil.checkPassword(config, null, password);
        ConfigWebUtil.checkGeneralReadAccess(config, password);
        try {
            if (config instanceof ConfigServer)
                ((PageContextImpl) pageContext).setServerPassword(password);
        } catch (Throwable t) {
            ExceptionUtil.rethrowIfNecessary(t);
        }
    } else if (check("getinfo", ACCESS_FREE) && check2(ACCESS_READ))
        doGetInfo();
    else if (check("surveillance", ACCESS_FREE) && check2(ACCESS_READ))
        doSurveillance();
    else if (check("getRegional", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRegional();
    else if (check("isMonitorEnabled", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doIsMonitorEnabled();
    else if (check("resetORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doResetORMSetting();
    else if (check("getORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetORMSetting();
    else if (check("getORMEngine", ACCESS_FREE) && check2(ACCESS_READ))
        doGetORMEngine();
    else if (check("updateORMSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doUpdateORMSetting();
    else if (check("getApplicationListener", ACCESS_FREE) && check2(ACCESS_READ))
        doGetApplicationListener();
    else if (check("getProxy", ACCESS_FREE) && check2(ACCESS_READ))
        doGetProxy();
    else if (check("getCharset", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCharset();
    else if (check("getComponent", ACCESS_FREE) && check2(ACCESS_READ))
        doGetComponent();
    else if (check("getScope", ACCESS_FREE) && check2(ACCESS_READ))
        doGetScope();
    else if (check("getApplicationSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetApplicationSetting();
    else if (check("getQueueSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetQueueSetting();
    else if (check("getOutputSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetOutputSetting();
    else if (check("getDatasourceSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDatasourceSetting();
    else if (check("getCustomTagSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCustomTagSetting();
    else if (check("getDatasource", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDatasource();
    else if (check("getDatasources", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDatasources();
    else if (check("getJDBCDrivers", ACCESS_FREE) && check2(ACCESS_READ))
        doGetJDBCDrivers();
    else if (check("getCacheConnections", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCacheConnections();
    else if (check("getCacheConnection", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCacheConnection();
    else if (check("getCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCacheDefaultConnection();
    else if (check("getRemoteClients", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRemoteClients();
    else if (check("getRemoteClient", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRemoteClient();
    else if (check("hasRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_READ))
        doHasRemoteClientUsage();
    else if (check("getRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRemoteClientUsage();
    else if (check("getSpoolerTasks", ACCESS_FREE) && check2(ACCESS_READ))
        doGetSpoolerTasks();
    else if (check("getPerformanceSettings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetPerformanceSettings();
    else if (check("getLogSettings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetLogSettings();
    else if (check("getCompilerSettings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCompilerSettings();
    else if (check("updatePerformanceSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdatePerformanceSettings();
    else if (check("updateCompilerSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCompilerSettings();
    else if (check("getGatewayentries", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
        doGetGatewayEntries();
    else if (check("getGatewayentry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
        doGetGatewayEntry();
    else if (check("getRunningThreads", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRunningThreads();
    else if (check("getMonitors", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doGetMonitors();
    else if (check("getMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doGetMonitor();
    else if (check("getBundles", ACCESS_FREE) && check2(ACCESS_READ))
        doGetBundles();
    else if (check("getBundle", ACCESS_FREE) && check2(ACCESS_READ))
        doGetBundle();
    else if (check("getExecutionLog", ACCESS_FREE) && check2(ACCESS_READ))
        doGetExecutionLog();
    else if (check("gateway", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
        doGateway();
    else // alias for getSpoolerTasks
    if (check("getRemoteClientTasks", ACCESS_FREE) && check2(ACCESS_READ))
        doGetSpoolerTasks();
    else if (check("getDatasourceDriverList", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDatasourceDriverList();
    else if (check("getDebuggingList", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDebuggingList();
    else if (check("getLoggedDebugData", ACCESS_FREE) && check2(ACCESS_READ))
        doGetLoggedDebugData();
    else if (check("getDebugSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDebugSetting();
    else if (check("getSSLCertificate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doGetSSLCertificate();
    else if (check("getPluginDirectory", ACCESS_FREE) && check2(ACCESS_READ))
        doGetPluginDirectory();
    else if (check("getPlugins", ACCESS_FREE) && check2(ACCESS_READ))
        doGetPlugins();
    else if (check("updatePlugin", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdatePlugin();
    else if (check("removePlugin", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemovePlugin();
    else if (check("getContextDirectory", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        getContextDirectory();
    else if (check("updateContext", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateContext();
    else if (check("removeContext", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveContext();
    else if (check("getJars", ACCESS_FREE) && check2(ACCESS_READ))
        doGetJars();
    else if (check("getFlds", ACCESS_FREE) && check2(ACCESS_READ))
        doGetFLDs();
    else if (check("getTlds", ACCESS_FREE) && check2(ACCESS_READ))
        doGetTLDs();
    else if (check("getRHExtensions", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRHExtensions();
    else if (check("getRHServerExtensions", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_READ))
        doGetRHServerExtensions();
    else if (check("getLocalExtension", ACCESS_FREE) && check2(ACCESS_READ))
        doGetLocalExtension();
    else if (check("getLocalExtensions", ACCESS_FREE) && check2(ACCESS_READ))
        doGetLocalExtensions();
    else if (check("getMailSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetMailSetting();
    else if (check("getTaskSetting", ACCESS_FREE) && check2(ACCESS_READ))
        doGetTaskSetting();
    else if (check("getMailServers", ACCESS_FREE) && check2(ACCESS_READ))
        doGetMailServers();
    else if (check("getMapping", ACCESS_FREE) && check2(ACCESS_READ))
        doGetMapping();
    else if (check("getMappings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetMappings();
    else if (check("getRestMappings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRestMappings();
    else if (check("getRestSettings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRestSettings();
    else if (check("getExtensions", ACCESS_FREE) && check2(ACCESS_READ))
        doGetExtensions();
    else if (check("getExtensionProviders", ACCESS_FREE) && check2(ACCESS_READ))
        doGetExtensionProviders();
    else if (check("getRHExtensionProviders", ACCESS_FREE) && check2(ACCESS_READ))
        doGetRHExtensionProviders();
    else if (check("getExtensionInfo", ACCESS_FREE) && check2(ACCESS_READ))
        doGetExtensionInfo();
    else if (check("getCustomTagMappings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCustomTagMappings();
    else if (check("getComponentMappings", ACCESS_FREE) && check2(ACCESS_READ))
        doGetComponentMappings();
    else if (check("getCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCFXTags();
    else if (check("getCPPCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
        doGetCPPCFXTags();
    else if (check("getJavaCfxTags", ACCESS_FREE) && check2(ACCESS_READ))
        doGetJavaCFXTags();
    else if (check("getDebug", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDebug();
    else if (check("getDebugEntry", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDebugEntry();
    else if (check("getError", ACCESS_FREE) && check2(ACCESS_READ))
        doGetError();
    else if (check("verifyremoteclient", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyRemoteClient();
    else if (check("verifyDatasource", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyDatasource();
    else if (check("verifyCacheConnection", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyCacheConnection();
    else if (check("verifyMailServer", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyMailServer();
    else if (check("verifyExtensionProvider", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyExtensionProvider();
    else if (check("verifyJavaCFX", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyJavaCFX();
    else if (check("verifyCFX", ACCESS_FREE) && check2(ACCESS_READ))
        doVerifyCFX();
    else if (check("resetId", ACCESS_FREE) && check2(ACCESS_WRITE))
        doResetId();
    else if (check("updateLoginSettings", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateLoginSettings();
    else if (check("updateLogSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateLogSettings();
    else if (check("updateJar", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateJar();
    else if (check("updateSSLCertificate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateSSLCertificate();
    else if (check("updateMonitorEnabled", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateMonitorEnabled();
    else if (check("updateTLD", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateTLD();
    else if (check("updateFLD", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateFLD();
    else if (check("updateregional", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRegional();
    else if (check("updateApplicationListener", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateApplicationListener();
    else if (check("updateCachedWithin", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCachedWithin();
    else if (check("updateproxy", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateProxy();
    else if (check("updateCharset", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCharset();
    else if (check("updatecomponent", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateComponent();
    else if (check("updatescope", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateScope();
    else if (check("updateRestSettings", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRestSettings();
    else if (check("updateRestMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRestMapping();
    else if (check("removeRestMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveRestMapping();
    else if (check("updateApplicationSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateApplicationSettings();
    else if (check("updateOutputSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateOutputSettings();
    else if (check("updateQueueSetting", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateQueueSettings();
    else if (check("updatepsq", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdatePSQ();
    else if (check("updatedatasource", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDatasource();
    else if (check("updateJDBCDriver", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateJDBCDriver();
    else if (check("updateCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCacheDefaultConnection();
    else if (check("updateCacheConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCacheConnection();
    else if (check("updateremoteclient", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRemoteClient();
    else if (check("updateRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRemoteClientUsage();
    else if (check("updatemailsetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateMailSetting();
    else if (check("updatemailserver", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateMailServer();
    else if (check("updatetasksetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateTaskSetting();
    else if (check("updatemapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateMapping();
    else if (check("updatecustomtag", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCustomTag();
    else if (check("updateComponentMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateComponentMapping();
    else if (check("stopThread", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doStopThread();
    else if (check("updatejavacfx", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateJavaCFX();
    else if (check("updatecppcfx", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCPPCFX();
    else if (check("updatedebug", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDebug();
    else if (check("updatedebugentry", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDebugEntry();
    else if (check("updatedebugsetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDebugSetting();
    else if (check("updateerror", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateError();
    else if (check("updateCustomTagSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateCustomTagSetting();
    else if (check("updateExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateExtension();
    else if (check("updateRHExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRHExtension();
    else if (check("removeRHExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveRHExtension();
    else if (check("updateExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateExtensionProvider();
    else if (check("updateRHExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateRHExtensionProvider();
    else if (check("updateExtensionInfo", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateExtensionInfo();
    else if (check("updateGatewayEntry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_WRITE))
        doUpdateGatewayEntry();
    else // else if(check("updateLogSettings", ACCESS_FREE) && check2(ACCESS_WRITE )) doUpdateUpdateLogSettings();
    if (check("updateMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateMonitor();
    else if (check("updateCacheHandler", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateCacheHandler();
    else if (check("updateORMEngine", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateORMEngine();
    else if (check("updateExecutionLog", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateExecutionLog();
    else // else if(check("removeproxy", ACCESS_NOT_WHEN_SERVER )) doRemoveProxy();
    if (check("removeMonitor", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveMonitor();
    else if (check("removeCacheHandler", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveCacheHandler();
    else if (check("removeORMEngine", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveORMEngine();
    else if (check("removebundle", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveBundle();
    else if (check("removeTLD", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveTLD();
    else if (check("removeFLD", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveFLD();
    else if (check("removeJDBCDriver", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveJDBCDriver();
    else if (check("removedatasource", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveDatasource();
    else if (check("removeCacheConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveCacheConnection();
    else if (check("removeremoteclient", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveRemoteClient();
    else if (check("removeRemoteClientUsage", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveRemoteClientUsage();
    else if (check("removeSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveSpoolerTask();
    else if (check("removeAllSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveAllSpoolerTask();
    else // alias for executeSpoolerTask
    if (check("removeRemoteClientTask", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveSpoolerTask();
    else if (check("executeSpoolerTask", ACCESS_FREE) && check2(ACCESS_WRITE))
        doExecuteSpoolerTask();
    else // alias for executeSpoolerTask
    if (check("executeRemoteClientTask", ACCESS_FREE) && check2(ACCESS_WRITE))
        doExecuteSpoolerTask();
    else if (check("removemailserver", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveMailServer();
    else if (check("removemapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveMapping();
    else if (check("removecustomtag", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveCustomTag();
    else if (check("removecomponentmapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveComponentMapping();
    else if (check("removecfx", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveCFX();
    else if (check("removeExtension", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveExtension();
    else if (check("removeExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveExtensionProvider();
    else if (check("removeRHExtensionProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveRHExtensionProvider();
    else if (check("removeDefaultPassword", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveDefaultPassword();
    else if (check("removeGatewayEntry", ACCESS_NOT_WHEN_SERVER) && check2(ACCESS_WRITE))
        doRemoveGatewayEntry();
    else if (check("removeDebugEntry", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveDebugEntry();
    else if (check("removeCacheDefaultConnection", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveCacheDefaultConnection();
    else if (check("removeLogSetting", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveLogSetting();
    else if (check("storageGet", ACCESS_FREE) && check2(ACCESS_READ))
        doStorageGet();
    else if (check("storageSet", ACCESS_FREE) && check2(ACCESS_WRITE))
        doStorageSet();
    else if (check("getdefaultpassword", ACCESS_FREE) && check2(ACCESS_READ))
        doGetDefaultPassword();
    else if (check("getContexts", ACCESS_FREE) && check2(ACCESS_READ))
        doGetContexts();
    else if (check("getContextes", ACCESS_FREE) && check2(ACCESS_READ))
        doGetContexts();
    else if (check("updatedefaultpassword", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDefaultPassword();
    else if (check("hasindividualsecurity", ACCESS_FREE) && check2(ACCESS_READ))
        doHasIndividualSecurity();
    else if (check("resetpassword", ACCESS_FREE) && check2(ACCESS_WRITE))
        doResetPassword();
    else if (check("stopThread", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doStopThread();
    else if (check("updateAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateAuthKey();
    else if (check("removeAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveAuthKey();
    else if (check("listAuthKey", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doListAuthKey();
    else if (check("updateAPIKey", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateAPIKey();
    else if (check("removeAPIKey", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveAPIKey();
    else if (check("getAPIKey", ACCESS_FREE) && check2(ACCESS_READ))
        doGetAPIKey();
    else if (check("createsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doCreateSecurityManager();
    else if (check("getsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doGetSecurityManager();
    else if (check("removesecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveSecurityManager();
    else if (check("getdefaultsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        doGetDefaultSecurityManager();
    else if (check("updatesecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateSecurityManager();
    else if (check("updatedefaultsecuritymanager", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateDefaultSecurityManager();
    else if (check("compileMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCompileMapping();
    else if (check("compileComponentMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCompileComponentMapping();
    else if (check("compileCTMapping", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCompileCTMapping();
    else if (check("createArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCreateArchive(MAPPING_REGULAR);
    else if (check("createComponentArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCreateArchive(MAPPING_CFC);
    else if (check("createCTArchive", ACCESS_FREE) && check2(ACCESS_WRITE))
        doCreateArchive(MAPPING_CT);
    else if (check("reload", ACCESS_FREE) && check2(ACCESS_WRITE))
        doReload();
    else if (check("getResourceProviders", ACCESS_FREE) && check2(ACCESS_READ))
        doGetResourceProviders();
    else if (check("updateResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateResourceProvider();
    else if (check("updateDefaultResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateDefaultResourceProvider();
    else if (check("removeResourceProvider", ACCESS_FREE) && check2(ACCESS_WRITE))
        doRemoveResourceProvider();
    else if (check("getClusterClass", ACCESS_FREE) && check2(ACCESS_READ))
        doGetClusterClass();
    else if (check("updateClusterClass", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateClusterClass();
    else if (check("getAdminSyncClass", ACCESS_FREE) && check2(ACCESS_READ))
        doGetAdminSyncClass();
    else if (check("updateAdminSyncClass", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateAdminSyncClass();
    else if (check("getVideoExecuterClass", ACCESS_FREE) && check2(ACCESS_READ))
        doGetVideoExecuterClass();
    else if (check("updateVideoExecuterClass", ACCESS_FREE) && check2(ACCESS_WRITE))
        doUpdateVideoExecuterClass();
    else if (check("terminateRunningThread", ACCESS_FREE) && check2(ACCESS_WRITE))
        doTerminateRunningThread();
    else if (check("updateLabel", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateLabel();
    else if (check("restart", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRestart();
    else if (check("runUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRunUpdate();
    else if (check("removeUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doRemoveUpdate();
    else if (check("changeVersionTo", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doChangeVersionTo();
    else if (check("getUpdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doGetUpdate();
    else if (check("getMinVersion", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        getMinVersion();
    else if (check("listPatches", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_READ))
        listPatches();
    else if (check("updateupdate", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateUpdate();
    else if (check("getSerial", ACCESS_FREE) && check2(ACCESS_READ))
        doGetSerial();
    else if (check("updateSerial", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doUpdateSerial();
    else if (check("heapDump", ACCESS_NOT_WHEN_WEB) && check2(ACCESS_WRITE))
        doHeapDump();
    else if (check("securitymanager", ACCESS_FREE) && check2(ACCESS_READ))
        doSecurityManager();
    else
        throw new ApplicationException("invalid action [" + action + "] for tag admin");
}
Also used : ConfigWebImpl(lucee.runtime.config.ConfigWebImpl) ApplicationException(lucee.runtime.exp.ApplicationException) ConfigServer(lucee.runtime.config.ConfigServer) ConfigImpl(lucee.runtime.config.ConfigImpl) PageException(lucee.runtime.exp.PageException) SecurityException(lucee.runtime.exp.SecurityException) IOException(java.io.IOException) DeprecatedException(lucee.runtime.exp.DeprecatedException) BundleException(org.osgi.framework.BundleException) MalformedURLException(java.net.MalformedURLException) SMTPException(lucee.runtime.net.mail.SMTPException) ApplicationException(lucee.runtime.exp.ApplicationException) Password(lucee.runtime.config.Password)

Aggregations

Password (lucee.runtime.config.Password)6 PageException (lucee.runtime.exp.PageException)4 XMLConfigAdmin (lucee.runtime.config.XMLConfigAdmin)3 FunctionException (lucee.runtime.exp.FunctionException)3 ConfigWebImpl (lucee.runtime.config.ConfigWebImpl)2 SecurityException (lucee.runtime.exp.SecurityException)2 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 Resource (lucee.commons.io.res.Resource)1 FileResourceProvider (lucee.commons.io.res.type.file.FileResourceProvider)1 ConfigImpl (lucee.runtime.config.ConfigImpl)1 ConfigServer (lucee.runtime.config.ConfigServer)1 ApplicationException (lucee.runtime.exp.ApplicationException)1 DeprecatedException (lucee.runtime.exp.DeprecatedException)1 SMTPException (lucee.runtime.net.mail.SMTPException)1 Mapping (lucee.runtime.rest.Mapping)1 ClassDefinitionImpl (lucee.transformer.library.ClassDefinitionImpl)1 BundleException (org.osgi.framework.BundleException)1