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