Package railo.runtime.exp

Examples of railo.runtime.exp.SecurityException


  public void resetORMSetting() throws SecurityException {
    boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManagerImpl.TYPE_ORM);
       
      if(!hasAccess)
            throw new SecurityException("no access to update ORM Settings");
       
   
   
    Element orm=_getRootElement("orm");
    orm.getParentNode().removeChild(orm);
View Full Code Here


  public void updateORMSetting(ORMConfiguration oc) throws SecurityException {
    boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManagerImpl.TYPE_ORM);
       
    if(!hasAccess)
            throw new SecurityException("no access to update ORM Settings");
       
   
   
    Element orm=_getRootElement("orm");
    orm.setAttribute("autogenmap",Caster.toString(oc.autogenmap(),"true"));
View Full Code Here

   public void updateSerial(String serial) throws PageException {
      
        checkWriteAccess();
          if(!(config instanceof ConfigServer)) {
              throw new SecurityException("can't change serial number from this context, access is denied");
          }
         
          Element root=doc.getDocumentElement();
          if(!StringUtil.isEmpty(serial)){
            serial=serial.trim();
            if(!new SerialNumber(serial).isValid(serial))
              throw new SecurityException("serial number is invalid");
            root.setAttribute("serial-number",serial);
          }
          else{
            try{
              root.removeAttribute("serial-number");
View Full Code Here

 
  public void updateDebugSetting(int maxLogs) throws SecurityException {
    checkWriteAccess();
        boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_DEBUGGING);
        if(!hasAccess)
            throw new SecurityException("no access to change debugging settings");
   
       
        Element debugging=_getRootElement("debugging");
        if(maxLogs==-1)
          debugging.removeAttribute("max-records-logged");
View Full Code Here

  public void updateDebugEntry(String type, String iprange,String label,String path,String fullname, Struct custom) throws SecurityException, IOException {
    checkWriteAccess();
        boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_DEBUGGING);
        if(!hasAccess)
            throw new SecurityException("no access to change debugging settings");
   
        // leave this, this method throws a exception when ip range is not valid
        IPRange.getInstance(iprange);
       
    String id=MD5.getDigestAsString(label.trim().toLowerCase());
View Full Code Here

  public void removeDebugEntry(String id) throws SecurityException {
    checkWriteAccess();
        boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_DEBUGGING);
        if(!hasAccess)
            throw new SecurityException("no access to change debugging settings");

     
        Element debugging=_getRootElement("debugging");
        Element[] children = ConfigWebFactory.getChildren(debugging,"debug-entry");
        String _id;
View Full Code Here

      if(config instanceof ConfigServer)access=SecurityManager.ACCESS_PROTECTED;
      if(access==SecurityManager.ACCESS_PROTECTED) {
        checkPassword(config,"read",password);
      }
      else if(access==SecurityManager.ACCESS_CLOSE) {
        throw new SecurityException("can't access, read access is disabled");
      }
  }
View Full Code Here

      if(config instanceof ConfigServer)access=SecurityManager.ACCESS_PROTECTED;
      if(access==SecurityManager.ACCESS_PROTECTED) {
        checkPassword(config,"write",password);
      }
      else if(access==SecurityManager.ACCESS_CLOSE) {
        throw new SecurityException("can't access, write access is disabled");
      }
  }
View Full Code Here

      }
  }

    public static void checkPassword(ConfigImpl config, String type,String password) throws SecurityException {
      if(!config.hasPassword())
            throw new SecurityException("can't access, no password is defined");
        //print.ln(config.getPassword()+".equalsIgnoreCase("+password+")");
        if(!config.isPasswordEqual(password,true)){
          if(StringUtil.isEmpty(password)){
            if(type==null)
              throw new SecurityException("Access is protected",
                        "to access the configuration without a password, you need to change the access to [open] in the Server Administrator");
            throw new SecurityException(type +" access is protected",
                    "to access the configuration without a password, you need to change the "+type+" access to [open] in the Server Administrator");
          }
            throw new SecurityException("No access, password is invalid");
        }
    }
View Full Code Here

  public void setTaskMaxThreads(Integer maxThreads) throws SecurityException {
    checkWriteAccess();
      boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING);
        if(!hasAccess)
            throw new SecurityException("no access to update task settings");
        Element mail=_getRootElement("remote-clients");
        mail.setAttribute("max-threads",Caster.toString(maxThreads,""));
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.SecurityException

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.