Package freenet.node.SecurityLevels

Examples of freenet.node.SecurityLevels.NETWORK_THREAT_LEVEL


  static final HTMLNode DOWNLOADS_LINK = QueueToadlet.DOWNLOADS_LINK;

  private static void addDownloadOptions(ToadletContext ctx, HTMLNode optionList, FreenetURI key, String mimeType,
          boolean disableFiltration, boolean dontShowFilter, NodeClientCore core) {
    PHYSICAL_THREAT_LEVEL threatLevel = core.node.securityLevels.getPhysicalThreatLevel();
    NETWORK_THREAT_LEVEL netLevel = core.node.securityLevels.getNetworkThreatLevel();
    boolean filterChecked = !(((threatLevel == PHYSICAL_THREAT_LEVEL.LOW &&
            netLevel == NETWORK_THREAT_LEVEL.LOW)) || disableFiltration);
    if((filterChecked) && mimeType != null && !mimeType.equals("application/octet-stream") &&
      !mimeType.equals("")) {
      FilterMIMEType type = ContentFilter.getMIMEType(mimeType);
View Full Code Here


    InfoboxNode infobox = pageMaker.getInfobox(
            NodeL10n.getBase().getString("QueueToadlet.insertFile"), "insert-queue", true);
    HTMLNode insertBox = infobox.outer;
    HTMLNode insertContent = infobox.content;
    insertContent.addChild("p", l10n("insertIntro"));
    NETWORK_THREAT_LEVEL seclevel = core.node.securityLevels.getNetworkThreatLevel();
    HTMLNode insertForm = ctx.addFormChild(insertContent, QueueToadlet.PATH_UPLOADS, "queueInsertForm");
    HTMLNode input = insertForm.addChild("input",
            new String[] { "type", "name", "value" },
            new String[] { "radio", "keytype", "CHK" });
    if ((!rememberedLastTime && seclevel == NETWORK_THREAT_LEVEL.LOW) ||
View Full Code Here

      boolean changedAnything = false;
      String configName = "security-levels.networkThreatLevel";
      String confirm = "security-levels.networkThreatLevel.confirm";
      String tryConfirm = "security-levels.networkThreatLevel.tryConfirm";
      String networkThreatLevel = request.getPartAsStringFailsafe(configName, 128);
      NETWORK_THREAT_LEVEL newThreatLevel = SecurityLevels.parseNetworkThreatLevel(networkThreatLevel);
      if(newThreatLevel != null) {
        if(newThreatLevel != node.securityLevels.getNetworkThreatLevel()) {
          if(!request.isPartSet(confirm) && !request.isPartSet(tryConfirm)) {
            HTMLNode warning = node.securityLevels.getConfirmWarning(newThreatLevel, confirm);
            if(warning != null) {
View Full Code Here

    formNode.addChild("div", "class", "configprefix", l10nSec("networkThreatLevelShort"));
    HTMLNode ul = formNode.addChild("ul", "class", "config");
    HTMLNode seclevelGroup = ul.addChild("li");
    seclevelGroup.addChild("#", l10nSec("networkThreatLevel.opennetIntro"));

    NETWORK_THREAT_LEVEL networkLevel = node.securityLevels.getNetworkThreatLevel();

    HTMLNode p = seclevelGroup.addChild("p");
    p.addChild("b", l10nSec("networkThreatLevel.opennetLabel"));
    p.addChild("#", ": "+l10nSec("networkThreatLevel.opennetExplain"));
    HTMLNode div = seclevelGroup.addChild("div", "class", "opennetDiv");
View Full Code Here

TOP

Related Classes of freenet.node.SecurityLevels.NETWORK_THREAT_LEVEL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.