mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
LDAP: iCal fix to suit both iCal 3 and 4: move cn to sn, remove cn
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@721 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4d46d7c078
commit
6b27c6193a
@ -473,8 +473,10 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_USER", currentMessageId, userName));
|
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_USER", currentMessageId, userName));
|
||||||
try {
|
try {
|
||||||
session = ExchangeSessionFactory.getInstance(userName, password);
|
session = ExchangeSessionFactory.getInstance(userName, password);
|
||||||
|
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_SUCCESS"));
|
||||||
sendClient(currentMessageId, LDAP_REP_BIND, LDAP_SUCCESS, "");
|
sendClient(currentMessageId, LDAP_REP_BIND, LDAP_SUCCESS, "");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS"));
|
||||||
sendClient(currentMessageId, LDAP_REP_BIND, LDAP_INVALID_CREDENTIALS, "");
|
sendClient(currentMessageId, LDAP_REP_BIND, LDAP_INVALID_CREDENTIALS, "");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -484,7 +486,7 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (requestOperation == LDAP_REQ_UNBIND) {
|
} else if (requestOperation == LDAP_REQ_UNBIND) {
|
||||||
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND", currentMessageId));
|
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_UNBIND", currentMessageId));
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
session = null;
|
session = null;
|
||||||
}
|
}
|
||||||
@ -785,6 +787,12 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
ldapPerson.put(ldapAttribute, value);
|
ldapPerson.put(ldapAttribute, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// iCal fix to suit both iCal 3 and 4: move cn to sn, remove cn
|
||||||
|
if (iCalSearch && ldapPerson.get("cn") != null && returningAttributes.contains("sn")) {
|
||||||
|
ldapPerson.put("sn", ldapPerson.get("cn"));
|
||||||
|
ldapPerson.remove("cn");
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// convert Contact entries
|
// convert Contact entries
|
||||||
for (Map.Entry<String, String> entry : person.entrySet()) {
|
for (Map.Entry<String, String> entry : person.entrySet()) {
|
||||||
@ -804,13 +812,6 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: fix for iCal4/iCal3
|
|
||||||
// iCal: copy cn to sn
|
|
||||||
//if (iCalSearch && ldapPerson.get("cn") != null && returningAttributes.contains("sn")) {
|
|
||||||
// ldapPerson.put("sn", ldapPerson.get("cn"));
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
// Process all attributes which have static mappings
|
// Process all attributes which have static mappings
|
||||||
for (Map.Entry<String, String> entry : STATIC_ATTRIBUTE_MAP.entrySet()) {
|
for (Map.Entry<String, String> entry : STATIC_ATTRIBUTE_MAP.entrySet()) {
|
||||||
String ldapAttribute = entry.getKey();
|
String ldapAttribute = entry.getKey();
|
||||||
|
@ -76,9 +76,11 @@ LOG_JAVA6_DESKTOP_UNAVAILABLE=Java 6 Desktop class not available
|
|||||||
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Ignoring filter attribute: {0}= {1}
|
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Ignoring filter attribute: {0}= {1}
|
||||||
LOG_LDAP_REPLACED_UID_FILTER=Replaced {0} with {1} in uid filter
|
LOG_LDAP_REPLACED_UID_FILTER=Replaced {0} with {1} in uid filter
|
||||||
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} for search {1}
|
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} for search {1}
|
||||||
LOG_LDAP_REQ_BIND=LDAP_REQ_UNBIND {0}
|
LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0}
|
||||||
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonymous
|
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonymous
|
||||||
LOG_LDAP_REQ_BIND_USER=LDAP_REQ_BIND {0} {1}
|
LOG_LDAP_REQ_BIND_USER=LDAP_REQ_BIND {0} {1}
|
||||||
|
LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Success
|
||||||
|
LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Invalid credentials
|
||||||
LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6}
|
LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6}
|
||||||
LOG_LDAP_REQ_SEARCH_ANONYMOUS_ACCESS_FORBIDDEN=LDAP_REQ_SEARCH {0} Anonymous access to {1} forbidden
|
LOG_LDAP_REQ_SEARCH_ANONYMOUS_ACCESS_FORBIDDEN=LDAP_REQ_SEARCH {0} Anonymous access to {1} forbidden
|
||||||
LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} end
|
LOG_LDAP_REQ_SEARCH_END=LDAP_REQ_SEARCH {0} end
|
||||||
|
@ -76,7 +76,7 @@ LOG_JAVA6_DESKTOP_UNAVAILABLE=Classe Java 6 Desktop non disponible
|
|||||||
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Filtre d''attribut ignoré : {0}= {1}
|
LOG_LDAP_IGNORE_FILTER_ATTRIBUTE=Filtre d''attribut ignoré : {0}= {1}
|
||||||
LOG_LDAP_REPLACED_UID_FILTER=Remplacé {0} par {1} dans le filtre uid
|
LOG_LDAP_REPLACED_UID_FILTER=Remplacé {0} par {1} dans le filtre uid
|
||||||
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} pour la recherche {1}
|
LOG_LDAP_REQ_ABANDON_SEARCH=LDAP_REQ_ABANDON {0} pour la recherche {1}
|
||||||
LOG_LDAP_REQ_BIND=LDAP_REQ_UNBIND {0}
|
LOG_LDAP_REQ_UNBIND=LDAP_REQ_UNBIND {0}
|
||||||
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonyme
|
LOG_LDAP_REQ_BIND_ANONYMOUS=LDAP_REQ_BIND {0} anonyme
|
||||||
LOG_LDAP_REQ_BIND_USER=LOG_LDAP_REQ_BIND_USER
|
LOG_LDAP_REQ_BIND_USER=LOG_LDAP_REQ_BIND_USER
|
||||||
LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6}
|
LOG_LDAP_REQ_SEARCH=LDAP_REQ_SEARCH {0} base={1} scope: {2} sizelimit: {3} timelimit: {4} filter: {5} returning attributes: {6}
|
||||||
@ -226,4 +226,6 @@ LOG_GATEWAY_INTERRUPTED=Arr
|
|||||||
LOG_GATEWAY_STOP=Passerelle DavMail arrêtée
|
LOG_GATEWAY_STOP=Passerelle DavMail arrêtée
|
||||||
LOG_INVALID_TIMEZONE=Fuseau horaire invalide : {0}
|
LOG_INVALID_TIMEZONE=Fuseau horaire invalide : {0}
|
||||||
MEETING_REQUEST=Invitation
|
MEETING_REQUEST=Invitation
|
||||||
LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1}
|
LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1}
|
||||||
|
LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Utilisateur ou mot de passe invalide
|
||||||
|
LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Authentification réussie
|
Loading…
x
Reference in New Issue
Block a user