This commit is contained in:
2026-02-24 08:51:11 -08:00
parent 13b3aed088
commit 17c647b4cd
19 changed files with 209 additions and 196 deletions

View File

@@ -29,7 +29,7 @@ namespace raven_integration
d.active = true;
d.login = UniqueName;
d.password = UniqueName;
d.roles = 2;//bizadminfull needs widget rights
d.roles = 2;//BizAdmin needs widget rights
d.userType = 3;//non scheduleable
//Required by form custom rules
@@ -131,8 +131,8 @@ namespace raven_integration
file1.Headers.ContentDisposition.FileName = "test.png";
formDataContent.Add(file1);
//ERROR CONDITION: BizAdminLimited user should not be able to attach a file to a widget
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("BizAdminLimited"));
//ERROR CONDITION: BizAdminRestricted user should not be able to attach a file to a widget
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("BizAdminRestricted"));
//2004 unauthorized
Util.ValidateErrorCodeResponse(a, 2004, 403);
@@ -159,7 +159,7 @@ namespace raven_integration
file1.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
file1.Headers.ContentDisposition.FileName = "test.png";
formDataContent.Add(file1);
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("InventoryFull"));
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("Inventory"));
//2203 unattachable object
Util.ValidateErrorCodeResponse(a, 2203, 400);
@@ -186,7 +186,7 @@ namespace raven_integration
file1.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data");
file1.Headers.ContentDisposition.FileName = "test.png";
formDataContent.Add(file1);
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("InventoryFull"));
ApiResponse a = await Util.PostFormDataAsync("attachment", formDataContent, await Util.GetTokenAsync("Inventory"));
//2203 invalid attachment object
Util.ValidateErrorCodeResponse(a, 2203, 400);