aed4b915a48b7f98cc1eb4ae3ea257e4cf994f4e
[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 _0x5060=['catch','util','../mysqldb','push','format','%s%s','agent','%s%s@xcally.com','password','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','then','add\x20user'];(function(_0x34ecea,_0x3d11ce){var _0x44b6a8=function(_0x5843a1){while(--_0x5843a1){_0x34ecea['push'](_0x34ecea['shift']());}};_0x44b6a8(++_0x3d11ce);}(_0x5060,0xb9));var _0x0506=function(_0x1adcaf,_0xf4acbd){_0x1adcaf=_0x1adcaf-0x0;var _0x2e7f0b=_0x5060[_0x1adcaf];return _0x2e7f0b;};'use strict';var util=require(_0x0506('0x0'));var db=require(_0x0506('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x0506('0x2')]({'name':util[_0x0506('0x3')](_0x0506('0x4'),_0x0506('0x5'),i),'fullname':util['format'](_0x0506('0x4'),'agent',i),'email':util[_0x0506('0x3')](_0x0506('0x6'),_0x0506('0x5'),i),'role':'agent','password':_0x0506('0x7'),'internal':0xfa0+i,'type':_0x0506('0x8'),'transport':[_0x0506('0x9'),'ws',_0x0506('0xa')],'disallow':[_0x0506('0xb')],'allow':[_0x0506('0xc')],'defaultuser':util['format'](_0x0506('0x4'),'agent',i),'encryption':'yes','avpf':_0x0506('0xd'),'force_avp':_0x0506('0xd'),'icesupport':_0x0506('0xd'),'dtlsenable':_0x0506('0xd'),'dtlsverify':'no','dtlscertfile':_0x0506('0xe'),'dtlsprivatekey':_0x0506('0xf'),'dtlssetup':_0x0506('0x10'),'callerid':util['format'](_0x0506('0x11'),util[_0x0506('0x3')](_0x0506('0x4'),'agent',i),0xfa0+i)});}db[_0x0506('0x12')][_0x0506('0x13')](users)[_0x0506('0x14')](function(){console['log'](_0x0506('0x15'));})[_0x0506('0x16')](function(_0x4e3489){console['log'](_0x4e3489);});