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