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