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