Package org.apache.ftpserver.ftplet

Examples of org.apache.ftpserver.ftplet.Authority


            userManagerFactory.setPasswordEncryptor(new SaltedPasswordEncryptor());
            UserManager um = userManagerFactory.createUserManager();

            if (createNewUsers) {
                List<Authority> auths = new ArrayList<Authority>();
                Authority auth = new WritePermission();
                auths.add(auth);

                BaseUser user = new BaseUser();
                user.setName("myNewUser");
                user.setPassword("secret");
View Full Code Here


    public AuthorizationRequest authorize(AuthorizationRequest request) {
        Authority[] authorities = getAuthorities();
       
        boolean someoneCouldAuthorize = false;
        for (int i = 0; i < authorities.length; i++) {
            Authority authority = authorities[i];
           
            if(authority.canAuthorize(request)) {
                someoneCouldAuthorize = true;
               
                request = authority.authorize(request);
               
                // authorization failed, return null
                if(request == null) {
                    return null;
                }
View Full Code Here

        user.setPassword("activemq");
        user.setHomeDirectory(ftpHomeDirFile.getParent());
       
        // authorize user
        List<Authority> auths = new ArrayList<Authority>();
        Authority auth = new WritePermission();
        auths.add(auth);
        user.setAuthorities(auths);
       
        userManager.save(user);
View Full Code Here

            return null;
        }
       
        boolean someoneCouldAuthorize = false;
        for (int i = 0; i < authorities.length; i++) {
            Authority authority = authorities[i];

            if (authority.canAuthorize(request)) {
                someoneCouldAuthorize = true;

                request = authority.authorize(request);

                // authorization failed, return null
                if (request == null) {
                    return null;
                }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.ftplet.Authority

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.