This commit is contained in:
@@ -360,7 +360,37 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
|
||||
UserPickList pl = UserPickList.GetList(false);
|
||||
progress.Append("Dumping " + pl.Count.ToString() + " Users");
|
||||
progress.Append("Exporting " + pl.Count.ToString() + " Users");
|
||||
|
||||
#region Export administrator wiki and attached files if present
|
||||
User admin = User.GetItem(User.AdministratorID);
|
||||
|
||||
//wiki page
|
||||
var adminWiki = GetWikiContent(new TypeAndID(RootObjectTypes.User, admin.ID));
|
||||
string adminCustomFields = null;
|
||||
//Custom fields?
|
||||
if (ShouldExportCustom)
|
||||
{
|
||||
adminCustomFields = CustomFieldData(admin, DateCustomFields);
|
||||
}
|
||||
|
||||
//check if we need to do anything with the manager account
|
||||
if (adminWiki != null || adminCustomFields != null)
|
||||
{
|
||||
//yes, so fetch it and modify it and put it back again
|
||||
var a = await util.GetAsync("User/1");
|
||||
dynamic d = a.ObjectResponse["data"];
|
||||
d.wiki = adminWiki;
|
||||
d.customFields = CustomFieldData(admin, DateCustomFields);
|
||||
await util.PutAsync("User/1", d.ToString());
|
||||
}
|
||||
|
||||
//Attachments
|
||||
if (adminWiki != null)
|
||||
await ExportAttachments(new TypeAndID(RootObjectTypes.User, User.AdministratorID));
|
||||
#endregion admin export
|
||||
|
||||
|
||||
foreach (UserPickList.UserPickListInfo i in pl)
|
||||
{
|
||||
List<string> tags = new List<string>();
|
||||
|
||||
@@ -141,6 +141,7 @@ namespace AyaNova.PlugIn.V8
|
||||
return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) };
|
||||
}
|
||||
|
||||
//
|
||||
public async static Task<ApiResponse> PostAsync(string route, string postJson = null)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user