d5b3c87b0e5133b8a0d3563dd457e4e1698b534e
[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 _0x2f90=['%s%s','agent','%s%s@xcally.com','password','wss','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','\x22%s\x22\x20<%s>','User','log','add\x20user','catch','../mysqldb','push','format'];(function(_0x5ab0a7,_0x5a5fc4){var _0x133ee7=function(_0x32a128){while(--_0x32a128){_0x5ab0a7['push'](_0x5ab0a7['shift']());}};_0x133ee7(++_0x5a5fc4);}(_0x2f90,0x1cd));var _0x02f9=function(_0x5be9bb,_0x457882){_0x5be9bb=_0x5be9bb-0x0;var _0x4544eb=_0x2f90[_0x5be9bb];return _0x4544eb;};'use strict';var util=require('util');var db=require(_0x02f9('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x02f9('0x1')]({'name':util[_0x02f9('0x2')](_0x02f9('0x3'),'agent',i),'fullname':util[_0x02f9('0x2')](_0x02f9('0x3'),_0x02f9('0x4'),i),'email':util[_0x02f9('0x2')](_0x02f9('0x5'),_0x02f9('0x4'),i),'role':_0x02f9('0x4'),'password':_0x02f9('0x6'),'internal':0xfa0+i,'type':'friend','transport':['udp','ws',_0x02f9('0x7')],'disallow':['all'],'allow':['ulaw'],'defaultuser':util[_0x02f9('0x2')]('%s%s',_0x02f9('0x4'),i),'encryption':'yes','avpf':'yes','force_avp':_0x02f9('0x8'),'icesupport':'yes','dtlsenable':_0x02f9('0x8'),'dtlsverify':'no','dtlscertfile':_0x02f9('0x9'),'dtlsprivatekey':_0x02f9('0xa'),'dtlssetup':'actpass','callerid':util[_0x02f9('0x2')](_0x02f9('0xb'),util[_0x02f9('0x2')]('%s%s',_0x02f9('0x4'),i),0xfa0+i)});}db[_0x02f9('0xc')]['bulkCreate'](users)['then'](function(){console[_0x02f9('0xd')](_0x02f9('0xe'));})[_0x02f9('0xf')](function(_0x3186ad){console['log'](_0x3186ad);});