This commit is contained in:
@@ -333,22 +333,6 @@ namespace AyaNova.PlugIn.V8
|
|||||||
private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress)
|
||||||
{
|
{
|
||||||
|
|
||||||
//List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
|
|
||||||
//objectExcludeProperties.Add("LastView");
|
|
||||||
//objectExcludeProperties.Add("LastSchedGroupID");
|
|
||||||
//objectExcludeProperties.Add("LastSchedStartDate");
|
|
||||||
//objectExcludeProperties.Add("LastSchedStopDate");
|
|
||||||
//objectExcludeProperties.Add("LastSchedView");
|
|
||||||
//objectExcludeProperties.Add("ScheduleLastGraphicalPrintSettings");
|
|
||||||
//objectExcludeProperties.Add("MainGridLastRowCount");
|
|
||||||
//objectExcludeProperties.Add("ScheduleLastViewOpenOnly");
|
|
||||||
//objectExcludeProperties.Add("IsAdministrator");
|
|
||||||
//objectExcludeProperties.Add("IsGenerator");
|
|
||||||
//objectExcludeProperties.Add("IsScheduleable");
|
|
||||||
//objectExcludeProperties.Add("IsClientOrHeadOfficeAccount");
|
|
||||||
//objectExcludeProperties.Add("IsClientAccount");
|
|
||||||
//objectExcludeProperties.Add("IsHeadOfficeAccount");
|
|
||||||
//objectExcludeProperties.Add("OrganizationTypeAndID");
|
|
||||||
|
|
||||||
UserPickList pl = UserPickList.GetList(false);
|
UserPickList pl = UserPickList.GetList(false);
|
||||||
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
||||||
@@ -370,6 +354,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
d.active = false;//all imported users are inactive to start
|
d.active = false;//all imported users are inactive to start
|
||||||
d.roles = 0;//todo: try to determine role from v7 member of group? or is that even possible?
|
d.roles = 0;//todo: try to determine role from v7 member of group? or is that even possible?
|
||||||
|
d.login = util.RandomString();
|
||||||
|
d.password = util.RandomString();
|
||||||
|
|
||||||
d.employeeNumber = c.EmployeeNumber;
|
d.employeeNumber = c.EmployeeNumber;
|
||||||
d.notes = c.Notes;
|
d.notes = c.Notes;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Net.Http;
|
|||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
|
||||||
namespace AyaNova.PlugIn.V8
|
namespace AyaNova.PlugIn.V8
|
||||||
@@ -189,6 +190,17 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
#region Misc utils
|
#region Misc utils
|
||||||
|
|
||||||
|
//used to set nonsense values from imported user login and password
|
||||||
|
//just in case they are set active after import but never have their passwords set
|
||||||
|
//so they can't be as easily hacked into
|
||||||
|
public static string RandomString()
|
||||||
|
{
|
||||||
|
var b = new byte[32];
|
||||||
|
var random = RandomNumberGenerator.Create();
|
||||||
|
random.GetNonZeroBytes(b);
|
||||||
|
return Convert.ToBase64String(b);
|
||||||
|
}
|
||||||
|
|
||||||
public static string NormalizeTag(string inObj)
|
public static string NormalizeTag(string inObj)
|
||||||
{
|
{
|
||||||
//Must be lowercase per rules
|
//Must be lowercase per rules
|
||||||
|
|||||||
Reference in New Issue
Block a user