Package org.apache.ftpserver.usermanager.impl

Examples of org.apache.ftpserver.usermanager.impl.WritePermission


            user.setMaxIdleTime(askForInt(in, "Max idle time in seconds (0 for none):"));
           
            List<Authority> authorities = new ArrayList<Authority>();
           
            if(askForBoolean(in, "Write permission (Y/N):")) {
                authorities.add(new WritePermission());
            }

            int maxLogins = askForInt(in, "Maximum number of concurrent logins (0 for no restriction)");
            int maxLoginsPerIp = askForInt(in, "Maximum number of concurrent logins per IP (0 for no restriction)");
           
View Full Code Here


            BaseUser user = new BaseUser();
            user.setName("admin");
            user.setPassword("admin");

            List<Authority> authorities = new ArrayList<Authority>();
            authorities.add( new WritePermission() );

            user.setAuthorities( authorities );

            user.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
View Full Code Here

            BaseUser user = new BaseUser();
            user.setName("admin");
            user.setPassword("admin");

            List<Authority> authorities = new ArrayList<Authority>();
            authorities.add( new WritePermission() );

            user.setAuthorities( authorities );

            user.setHomeDirectory( ftpHomeDir.getAbsolutePath() );
View Full Code Here

      super("admin", new ClearTextPasswordEncryptor());
      testUser = new BaseUser();
      testUser.setName("ftpuser");
      testUser.setPassword("ftpuser");
      testUser.setAuthorities(Arrays.asList(new Authority[] { new ConcurrentLoginPermission(3, 3),
        new WritePermission() }));
      testUser.setEnabled(true);
      testUser.setHomeDirectory(FTP_ROOT_DIR);
    }
View Full Code Here

    private final BaseUser testUser;

    private TestUserManager(String homeDirectory) {
      this.testUser = new BaseUser();
      this.testUser.setAuthorities(Arrays.asList(new ConcurrentLoginPermission(1024, 1024),
          new WritePermission(),
          new TransferRatePermission(1024, 1024)));
      this.testUser.setHomeDirectory(homeDirectory);
      this.testUser.setName("TEST_USER");
    }
View Full Code Here

  @Override
  public List<Authority> getAuthorities() {
    List<Authority> auths = new ArrayList<>();

    auths.add(new ConcurrentLoginPermission(10, 10));
    auths.add(new WritePermission());

    return auths;
  }
View Full Code Here

        user.setName(username);
        user.setPassword(null);
        user.setEnabled(true);
        // allow writing
        List<Authority> authorities = new ArrayList<Authority>();
        authorities.add(new WritePermission());
        authorities.add(new ConcurrentLoginPermission(Integer.MAX_VALUE, Integer.MAX_VALUE));
        user.setAuthorities(authorities);

        return user;
    }
View Full Code Here

        user.setName(username);
        user.setPassword(null);
        user.setEnabled(true);
        // allow writing
        List<Authority> authorities = new ArrayList<Authority>();
        authorities.add(new WritePermission());
        authorities.add(new ConcurrentLoginPermission(Integer.MAX_VALUE, Integer.MAX_VALUE));
        user.setAuthorities(authorities);

        return user;
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.usermanager.impl.WritePermission

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.