841903cf5237eaf39aa84f77153e457402c3bdaa
[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 _0xd38c=['actpass','\x22%s\x22\x20<%s>','%s%s','then','log','add\x20user','catch','util','../mysqldb','push','format','agent','%s%s@xcally.com','password','friend','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key'];(function(_0x1a50f5,_0x2895ef){var _0x4afc82=function(_0x97a47e){while(--_0x97a47e){_0x1a50f5['push'](_0x1a50f5['shift']());}};_0x4afc82(++_0x2895ef);}(_0xd38c,0x1ab));var _0xcd38=function(_0xc10d17,_0x5b6554){_0xc10d17=_0xc10d17-0x0;var _0x1ed8fb=_0xd38c[_0xc10d17];return _0x1ed8fb;};'use strict';var util=require(_0xcd38('0x0'));var db=require(_0xcd38('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xcd38('0x2')]({'name':util['format']('%s%s','agent',i),'fullname':util[_0xcd38('0x3')]('%s%s',_0xcd38('0x4'),i),'email':util[_0xcd38('0x3')](_0xcd38('0x5'),_0xcd38('0x4'),i),'role':'agent','password':_0xcd38('0x6'),'internal':0xfa0+i,'type':_0xcd38('0x7'),'transport':['udp','ws',_0xcd38('0x8')],'disallow':[_0xcd38('0x9')],'allow':[_0xcd38('0xa')],'defaultuser':util[_0xcd38('0x3')]('%s%s',_0xcd38('0x4'),i),'encryption':_0xcd38('0xb'),'avpf':_0xcd38('0xb'),'force_avp':_0xcd38('0xb'),'icesupport':_0xcd38('0xb'),'dtlsenable':_0xcd38('0xb'),'dtlsverify':'no','dtlscertfile':_0xcd38('0xc'),'dtlsprivatekey':_0xcd38('0xd'),'dtlssetup':_0xcd38('0xe'),'callerid':util[_0xcd38('0x3')](_0xcd38('0xf'),util[_0xcd38('0x3')](_0xcd38('0x10'),_0xcd38('0x4'),i),0xfa0+i)});}db['User']['bulkCreate'](users)[_0xcd38('0x11')](function(){console[_0xcd38('0x12')](_0xcd38('0x13'));})[_0xcd38('0x14')](function(_0x33e390){console[_0xcd38('0x12')](_0x33e390);});