<commit_before>var url = require('url');

var config = {};

config.mongodb = {};
config.ldap = {};
config.roles = {};

if (process.env.MONGOHQ_URL) {
	var info = url.parse(process.env.MONGOHQ_URL);
	config.mongodb.dbname = info.pathname.replace("/", "");
	config.mongodb.host = info.host;
	config.mongodb.port = info.port;
	if (info.auth) {
		try {
			config.mongodb.user = info.auth.split(":")[0];
			config.mongodb.pass = info.auth.split(":")[1];
		} catch (err) {
			console.log("Error parsing auth info.");
		}
	}
} else if (process.env.MONGO_URL) {
	var info = url.parse(process.env.MONGO_URL);
	config.mongodb.dbname = info.pathname.replace("/", "");
	config.mongodb.host = info.host;
	config.mongodb.port = info.port;
	if (info.auth) {
		try {
			config.mongodb.user = info.auth.split(":")[0];
			config.mongodb.pass = info.auth.split(":")[1];
		} catch (err) {
			console.log("Error parsing auth info.");
		}
	}
} else {
	config.mongodb.dbname = 'charity-campaign';
	config.mongodb.host = 'localhost';
	config.mongodb.port = 27017;
}

// ldap connection info for user accounts
config.ldap.enable = true;
config.ldap.url = 'ldap://localhost:10389';
config.ldap.userSearch = "uid=[login],ou=system";

// configure various roles for charity campaign (used by controllers for security)
config.roles.CAMPAIGN_ADMIN_ROLE = 'Campaign Administrator ';
config.roles.ADMIN_ROLE = "Administrator";
config.roles.TEAM_CAPTAIN_ROLE = "Team Captain ";

module.exports = config;<commit_msg>disable ldap<commit_after>var url = require('url');

var config = {};

config.mongodb = {};
config.ldap = {};
config.roles = {};

if (process.env.MONGOHQ_URL) {
	var info = url.parse(process.env.MONGOHQ_URL);
	config.mongodb.dbname = info.pathname.replace("/", "");
	config.mongodb.host = info.host;
	config.mongodb.port = info.port;
	if (info.auth) {
		try {
			config.mongodb.user = info.auth.split(":")[0];
			config.mongodb.pass = info.auth.split(":")[1];
		} catch (err) {
			console.log("Error parsing auth info.");
		}
	}
} else if (process.env.MONGO_URL) {
	var info = url.parse(process.env.MONGO_URL);
	config.mongodb.dbname = info.pathname.replace("/", "");
	config.mongodb.host = info.host;
	config.mongodb.port = info.port;
	if (info.auth) {
		try {
			config.mongodb.user = info.auth.split(":")[0];
			config.mongodb.pass = info.auth.split(":")[1];
		} catch (err) {
			console.log("Error parsing auth info.");
		}
	}
} else {
	config.mongodb.dbname = 'charity-campaign';
	config.mongodb.host = 'localhost';
	config.mongodb.port = 27017;
}

// ldap connection info for user accounts
config.ldap.enable = false;
config.ldap.url = 'ldap://localhost:10389';
config.ldap.userSearch = "uid=[login],ou=system";

// configure various roles for charity campaign (used by controllers for security)
config.roles.CAMPAIGN_ADMIN_ROLE = 'Campaign Administrator ';
config.roles.ADMIN_ROLE = "Administrator";
config.roles.TEAM_CAPTAIN_ROLE = "Team Captain ";

module.exports = config;
{'fraction_non_alphanumeric': 0.17611336032388664, 'fraction_numerical': 0.009446693657219974, 'mean_word_length': 4.183566433566433, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6141663', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1085, 'n_words': 194}