diff --git a/Attachments/AttachmentTest.cs b/Attachments/AttachmentTest.cs index b97e8a5..adbfb4f 100644 --- a/Attachments/AttachmentTest.cs +++ b/Attachments/AttachmentTest.cs @@ -27,10 +27,11 @@ namespace raven_integration d.name = UniqueName; d.active = true; + d.allowLogin = true; d.login = UniqueName; d.password = UniqueName; - d.roles = 2;//BizAdmin needs widget rights - d.userType = 3;//non scheduleable + d.roles = 2;//BizAdmin needs full rights + d.userType = 2;// not service type user //Required by form custom rules d.notes = "notes"; @@ -51,7 +52,7 @@ namespace raven_integration MultipartFormDataContent formDataContent = new MultipartFormDataContent(); //Form data like the bizobject type and id - formDataContent.Add(new StringContent("3"), name: "AttachToObjectType"); + formDataContent.Add(new StringContent("3"), name: "AttachToAType"); formDataContent.Add(new StringContent(TestUserId.ToString()), name: "AttachToObjectId"); formDataContent.Add(new StringContent("Test:AttachmentUploadDownloadDeleteShouldWork"), name: "Notes"); formDataContent.Add(new StringContent("[{\"name\":\"test.zip\",\"lastModified\":1582822079618},{\"name\":\"test.png\",\"lastModified\":1586900220990}]"), name: "FileData"); @@ -74,7 +75,10 @@ namespace raven_integration //create via inventory full test user as attachments use the role of the object attaching to a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("superuser", "l3tm3in")); - +// {[error, { +// "code": "2203", +// "message": "Missing one or more required FormFieldData values: AttachToAType, AttachToObjectId, FileData" +// }]} Util.ValidateDataReturnResponseOk(a); diff --git a/EventLog/EventLog.cs b/EventLog/EventLog.cs index ee300b7..f43930a 100644 --- a/EventLog/EventLog.cs +++ b/EventLog/EventLog.cs @@ -146,7 +146,7 @@ namespace raven_integration d.login = UniqueName; d.password = UniqueName; d.roles = 2;//BizAdmin needs widget rights - d.userType = 3;//non scheduleable + d.userType = 2;// not service type user //Required by form custom rules d.notes = "notes"; diff --git a/Search/SearchOps.cs b/Search/SearchOps.cs index 62c013c..80f41c1 100644 --- a/Search/SearchOps.cs +++ b/Search/SearchOps.cs @@ -41,7 +41,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -58,7 +58,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -174,7 +174,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user D.customFields = Util.UserRequiredCustomFieldsJsonString(); a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); @@ -238,7 +238,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user D.customFields = Util.UserRequiredCustomFieldsJsonString(); a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); @@ -304,7 +304,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user D.customFields = Util.UserRequiredCustomFieldsJsonString(); a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); @@ -411,7 +411,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.usertype = 1; - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user D.customFields = Util.UserRequiredCustomFieldsJsonString(); a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); diff --git a/Translation/Translation.cs b/Translation/Translation.cs index 252bce8..d4479d9 100644 --- a/Translation/Translation.cs +++ b/Translation/Translation.cs @@ -123,7 +123,7 @@ namespace raven_integration DUSER.password = Password; DUSER.roles = 0;//norole (any role can get a subset of translation keys) // DUSER.translationId = NewId; - DUSER.userType = 3;//non scheduleable + DUSER.userType = 2;// not service type user //Required by form custom rules DUSER.notes = "notes"; DUSER.customFields = Util.UserRequiredCustomFieldsJsonString(); diff --git a/User/UserCrud.cs b/User/UserCrud.cs index 22f39eb..363280f 100644 --- a/User/UserCrud.cs +++ b/User/UserCrud.cs @@ -25,7 +25,7 @@ namespace raven_integration D1.password = Util.Uniquify("PASSWORD"); D1.roles = 0;//norole - D1.userType = 3;//non scheduleable + D1.userType = 2;// not service type user //Required by form custom rules D1.notes = "notes"; @@ -46,7 +46,7 @@ namespace raven_integration D2.password = Util.Uniquify("PASSWORD"); D2.roles = 0;//norole - D2.userType = 3;//non scheduleable + D2.userType = 2;// not service type user ApiResponse R2 = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D2.ToString()); Util.ValidateDataReturnResponseOk(R2); @@ -137,7 +137,7 @@ namespace raven_integration D.password = Util.Uniquify("PASSWORD"); D.roles = 0;//norole - D.userType = 3;//non scheduleable + D.userType = 2;// not service type user ApiResponse R = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), D.ToString()); Util.ValidateDataReturnResponseOk(R); @@ -172,7 +172,7 @@ namespace raven_integration d.password = Util.Uniquify("PASSWORD"); d.roles = 0;//norole - d.userType = 3;//non scheduleable + d.userType = 2;// not service type user //Required by form custom rules d.notes = "notes"; d.customFields = Util.UserRequiredCustomFieldsJsonString(); @@ -227,7 +227,7 @@ namespace raven_integration d.login = UniqueLogin; d.password = Util.Uniquify("PASSWORD"); d.roles = 0;//norole - d.userType = 3;//non scheduleable + d.userType = 2;// not service type user ApiResponse a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString()); Util.ValidateDataReturnResponseOk(a); @@ -243,7 +243,7 @@ namespace raven_integration d.login = UniqueLogin; d.password = Util.Uniquify("PASSWORD"); d.roles = 0;//norole - d.userType = 3;//non scheduleable + d.userType = 2;// not service type user a = await Util.PostAsync("User", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString()); diff --git a/User/UserOptions.cs b/User/UserOptions.cs index 9cd1c3a..629c149 100644 --- a/User/UserOptions.cs +++ b/User/UserOptions.cs @@ -24,7 +24,7 @@ namespace raven_integration D1.login = Util.Uniquify("LOGIN"); D1.password = Util.Uniquify("PASSWORD"); D1.roles = 0;//norole - D1.userType = 3;//non scheduleable + D1.userType = 2;// not service type user D1.notes = "notes"; D1.customFields = Util.UserRequiredCustomFieldsJsonString();