if (regexp.startsWith("##")) continue;
else {
try {
Pattern.compile(regexp);
} catch (PatternSyntaxException pse) {
throw new StartupException("Invalid pattern syntax in blacklist. Pattern: " + regexp);
}
loginBlacklist.add(regexp);
count++;
}
}
Tracing.logInfo("Successfully added " + count + " entries to login blacklist.", UserModule.class);
} catch (Exception e) {
throw new StartupException("Unable to read blacklist. Please fix.");
} finally {
if (fReader != null) try {
fReader.close();
} catch (Exception e) {
// ok in finally block.
}
}
}
// Autogeneration of test users
String generateTestUsers = configuration.getChildValue("generateTestUsers");
if (generateTestUsers == null) hasTestUsers = false;
else {
if (generateTestUsers.equals("true")) {
hasTestUsers = true;
} else if (generateTestUsers.equals("false")) {
hasTestUsers = false;
} else {
throw new StartupException("UserModule configuration Element 'generateTestUsers' was set to '" + generateTestUsers
+ "' but only value 'true' or 'false' is allowed.");
}
}
// Check if default users exists, if not create them
securityManager = ManagerFactory.getManager();