BaseUser fails to authorise
---------------------------

                 Key: FTPSERVER-128
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-128
             Project: FtpServer
          Issue Type: Bug
          Components: Core
         Environment: Code error, OS indeoendent
            Reporter: Curt Johanson


The BaseUser authorize method loops through the authorities objects for the 
user and if an authority object CAN authorize but refuses the method return 
null, thus ignoring authority objects later in the list that MAY be able to 
authorize. My suggestion to the method is the following (unless I missed 
something)

        public AuthorizationRequest authorize(AuthorizationRequest request) {
                Authority[] authorities = getAuthorities();

                for (int i = 0; i < authorities.length; i++) {
                        Authority authority = authorities[i];

                        if (authority.canAuthorize(request)) {

                                if (null != authority.authorize(request)) {
                                        return request;
                                }
                        }

                }
                        
                return null;
        }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to