<commit_before>'use strict';
var fs = require("fs");
var uuid = require('uuid');
var userCollectionName = "users";
var groupsCollectionName = "groups";

var guest = require("./guest.js");
var account = require("./account.js");
var user = require("./user.js");
var group = require("./group.js");
var token = require("./token.js");

var utils = require("./utils.js");

var Mongo = require("soajs").mongo;
var mongoCore = null;

var soajs = require("soajs");
var Auth = soajs.authorization;

var async = require('async');

function checkIfTenantIsDBTN(req, cb) {
	//todo tenantCode is hard coded for now until acl is fixed
	if (!mongoCore) {
		mongoCore = new Mongo(req.soajs.registry.coreDB.provision);
	}
	if (!req.soajs.inputmaskData) {
		req.soajs.inputmaskData = {};
	}
	req.soajs.inputmaskData.tenantCode = 'DBTN';
	req.soajs.inputmaskData.isOwner = true;
	
	return cb(null, true);
}

var libProduct = {
	"model": null,
	
	"guest": guest,
	
	"account": account,
	
	"admin": {
		/**
		 * List all the users and groups<commit_msg>updates to accommodate test cases<commit_after>'use strict';
var fs = require("fs");
var uuid = require('uuid');
var userCollectionName = "users";
var groupsCollectionName = "groups";

var guest = require("./guest.js");
var account = require("./account.js");
var user = require("./user.js");
var group = require("./group.js");
var token = require("./token.js");

var utils = require("./utils.js");

var Mongo = require("soajs").mongo;
var mongoCore = null;

var soajs = require("soajs");
var Auth = soajs.authorization;

var async = require('async');

function checkIfTenantIsDBTN(req, cb) {
	//todo tenantCode is hard coded for now until acl is fixed
	if (!mongoCore) {
		mongoCore = new Mongo(req.soajs.registry.coreDB.provision);
	}
	if (!req.soajs.inputmaskData) {
		req.soajs.inputmaskData = {};
	}
	
	req.soajs.inputmaskData.isOwner = true;
	//todo just for test cases
	if (process.env.SOAJS_TEST){
		mongoCore.findOne('tenants', { 'locked': true }, { applications: 0 }, function (error, tenant) {
			if (!error && tenant) {
				req.soajs.inputmaskData.tenantCode = tenant.code;
			}
			return cb(error, true);
		});
	}
	else {
		req.soajs.inputmaskData.tenantCode = 'DBTN';
		return cb(null, true);
	}
}

var libProduct = {
	"model": null,
	
	"guest": guest,
	
	"account": account,
	
	"admin": {
		/**
		 * List all the users and groups
{'fraction_non_alphanumeric': 0.16807076663858467, 'fraction_numerical': 0.00042122999157540015, 'mean_word_length': 4.129589632829374, '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': '3039632', 'n_tokens_mistral': 884, 'n_tokens_neox': 840, 'n_words': 209}