Built motion from commit bab6f49e.|2.6.17
[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 _0x03ba=['User','bulkCreate','log','add\x20user','catch','util','../mysqldb','format','agent','password','friend','all','ulaw','%s%s','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>'];(function(_0x31bbf7,_0x292c9a){var _0x1469f3=function(_0x58ca15){while(--_0x58ca15){_0x31bbf7['push'](_0x31bbf7['shift']());}};_0x1469f3(++_0x292c9a);}(_0x03ba,0x181));var _0xa03b=function(_0x92a1c0,_0x26e3b2){_0x92a1c0=_0x92a1c0-0x0;var _0x2f741f=_0x03ba[_0x92a1c0];return _0x2f741f;};'use strict';var util=require(_0xa03b('0x0'));var db=require(_0xa03b('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util[_0xa03b('0x2')]('%s%s',_0xa03b('0x3'),i),'fullname':util[_0xa03b('0x2')]('%s%s',_0xa03b('0x3'),i),'email':util[_0xa03b('0x2')]('%s%s@xcally.com',_0xa03b('0x3'),i),'role':'agent','password':_0xa03b('0x4'),'internal':0xfa0+i,'type':_0xa03b('0x5'),'transport':['udp','ws','wss'],'disallow':[_0xa03b('0x6')],'allow':[_0xa03b('0x7')],'defaultuser':util['format'](_0xa03b('0x8'),_0xa03b('0x3'),i),'encryption':_0xa03b('0x9'),'avpf':_0xa03b('0x9'),'force_avp':_0xa03b('0x9'),'icesupport':_0xa03b('0x9'),'dtlsenable':_0xa03b('0x9'),'dtlsverify':'no','dtlscertfile':_0xa03b('0xa'),'dtlsprivatekey':_0xa03b('0xb'),'dtlssetup':_0xa03b('0xc'),'callerid':util[_0xa03b('0x2')](_0xa03b('0xd'),util[_0xa03b('0x2')](_0xa03b('0x8'),_0xa03b('0x3'),i),0xfa0+i)});}db[_0xa03b('0xe')][_0xa03b('0xf')](users)['then'](function(){console[_0xa03b('0x10')](_0xa03b('0x11'));})[_0xa03b('0x12')](function(_0x439bc2){console[_0xa03b('0x10')](_0x439bc2);});