5cd39c3ded1ae3279f16305c7ce20d526f620e0a
[motion2.git] / server / config / seedUsers.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x5485=['%s%s@xcally.com','password','friend','udp','wss','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','User','then','log','../mysqldb','push','format','%s%s','agent'];(function(_0x2aa0f0,_0x21a1c4){var _0x54014a=function(_0x569952){while(--_0x569952){_0x2aa0f0['push'](_0x2aa0f0['shift']());}};_0x54014a(++_0x21a1c4);}(_0x5485,0x1f3));var _0x5548=function(_0x456b90,_0x42844b){_0x456b90=_0x456b90-0x0;var _0x402b71=_0x5485[_0x456b90];return _0x402b71;};'use strict';var util=require('util');var db=require(_0x5548('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x5548('0x1')]({'name':util[_0x5548('0x2')](_0x5548('0x3'),_0x5548('0x4'),i),'fullname':util['format'](_0x5548('0x3'),'agent',i),'email':util[_0x5548('0x2')](_0x5548('0x5'),_0x5548('0x4'),i),'role':_0x5548('0x4'),'password':_0x5548('0x6'),'internal':0xfa0+i,'type':_0x5548('0x7'),'transport':[_0x5548('0x8'),'ws',_0x5548('0x9')],'disallow':['all'],'allow':[_0x5548('0xa')],'defaultuser':util[_0x5548('0x2')](_0x5548('0x3'),'agent',i),'encryption':_0x5548('0xb'),'avpf':_0x5548('0xb'),'force_avp':_0x5548('0xb'),'icesupport':_0x5548('0xb'),'dtlsenable':_0x5548('0xb'),'dtlsverify':'no','dtlscertfile':_0x5548('0xc'),'dtlsprivatekey':_0x5548('0xd'),'dtlssetup':_0x5548('0xe'),'callerid':util[_0x5548('0x2')]('\x22%s\x22\x20<%s>',util[_0x5548('0x2')](_0x5548('0x3'),_0x5548('0x4'),i),0xfa0+i)});}db[_0x5548('0xf')]['bulkCreate'](users)[_0x5548('0x10')](function(){console[_0x5548('0x11')]('add\x20user');})['catch'](function(_0x5dd8df){console[_0x5548('0x11')](_0x5dd8df);});