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