Merge remote-tracking branch 'mine/JAMES-1940-2'

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/d5495352
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/d5495352
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/d5495352

Branch: refs/heads/master
Commit: d5495352318a74c3f375e85d6d96e9a5632a0d53
Parents: 3f26ba0 df96d1a
Author: Antoine Duprat <[email protected]>
Authored: Tue Feb 14 13:05:16 2017 +0100
Committer: Antoine Duprat <[email protected]>
Committed: Tue Feb 14 13:05:16 2017 +0100

----------------------------------------------------------------------
 .../ldap/ReadOnlyUsersLDAPRepositoryTest.java   | 62 +++++++++++++++++++-
 .../src/test/resources/ldif-files/populate.ldif |  1 +
 .../user/ldap/ReadOnlyUsersLDAPRepository.java  |  6 +-
 3 files changed, 67 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/d5495352/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
----------------------------------------------------------------------
diff --cc 
server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
index cc9eeb2,4948a39..f828cb5
--- 
a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
+++ 
b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
@@@ -781,14 -768,10 +781,18 @@@ public class ReadOnlyUsersLDAPRepositor
  
      @Override
      public String getUser(MailAddress mailAddress) throws 
UsersRepositoryException {
-         return mailAddress.getLocalPart();
+         if (supportVirtualHosting()) {
+             return mailAddress.asString();
+         } else {
+             return mailAddress.getLocalPart();
+         }
      }
 +
 +    @Override
 +    public boolean isAdministrator(String username) throws 
UsersRepositoryException {
 +        if (administratorId.isPresent()) {
 +            return administratorId.get().equals(username);
 +        }
 +        return false;
 +    }
  }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to