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