|
@ -27,6 +27,7 @@ public class LdapSync { |
|
|
private final Properties properties = new Properties(); |
|
|
private final Properties properties = new Properties(); |
|
|
private final static Pattern legacyPattern = Pattern.compile("^fd([a-z][a-z])?([0-9]*?)$"); |
|
|
private final static Pattern legacyPattern = Pattern.compile("^fd([a-z][a-z])?([0-9]*?)$"); |
|
|
private final static Pattern newPattern = Pattern.compile("^fd([0-9][0-9][0-9][0-9][0-9][0-9][0-9])$"); |
|
|
private final static Pattern newPattern = Pattern.compile("^fd([0-9][0-9][0-9][0-9][0-9][0-9][0-9])$"); |
|
|
|
|
|
private final static Pattern newGuestPattern = Pattern.compile("^fdg([0-9][0-9][0-9][0-9][0-9])$"); |
|
|
private Map<String, Integer> userDefinedMappings = Collections.emptyMap(); |
|
|
private Map<String, Integer> userDefinedMappings = Collections.emptyMap(); |
|
|
|
|
|
|
|
|
public LdapSync() throws IOException, LDAPException, GeneralSecurityException { |
|
|
public LdapSync() throws IOException, LDAPException, GeneralSecurityException { |
|
@ -157,6 +158,13 @@ public class LdapSync { |
|
|
return 270000000 + Integer.parseInt(x.group(1)); |
|
|
return 270000000 + Integer.parseInt(x.group(1)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final Matcher y = newGuestPattern.matcher(cn); |
|
|
|
|
|
|
|
|
|
|
|
if (y.find()) { |
|
|
|
|
|
return 300000000 + Integer.parseInt(y.group(1)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final Matcher m = legacyPattern.matcher(cn); |
|
|
final Matcher m = legacyPattern.matcher(cn); |
|
|
|
|
|
|
|
|
if (m.find()) { |
|
|
if (m.find()) { |
|
|