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