From 9174935c7161117c19e5b360b8d03c0ac0241968 Mon Sep 17 00:00:00 2001 From: Karsten Thiems <150006841+typecastcloud@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:47:43 +0200 Subject: [PATCH] feat(tech user): add internal invitation tech user Allows adding technical user for invitation api as CX Operator. Refs: eclipse-tractusx/portal-backend#932 --- .../Seeder/Data/user_role_assigned_collections.json | 4 ++++ .../Seeder/Data/user_role_descriptions.json | 10 ++++++++++ .../Seeder/Data/user_roles.json | 6 ++++++ .../CompanyRoleCollectionRolesViewTests.cs | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_assigned_collections.json b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_assigned_collections.json index 7a398fa23e..3719f30efd 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_assigned_collections.json +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_assigned_collections.json @@ -31,6 +31,10 @@ "user_role_id": "607818be-4978-41f4-bf63-fa6d2de51262", "user_role_collection_id": "1a24eca5-901f-4191-84a7-4ef09a894575" }, + { + "user_role_id": "34c42896-a003-4653-af8f-ba06ca595754", + "user_role_collection_id": "1a24eca5-901f-4191-84a7-4ef09a894575" + }, { "user_role_id": "58f897ec-0aad-4588-8ffa-5f45d6638633", "user_role_collection_id": "8cb12ea2-aed4-4d75-b041-ba297df3d2f2" diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_descriptions.json b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_descriptions.json index 879d177b50..1c4b9e622e 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_descriptions.json +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_role_descriptions.json @@ -258,5 +258,15 @@ "user_role_id": "c01818be-4978-41f4-bf63-fa6d2de53267", "language_short_name": "en", "description": "BPDM Pool Sharing Consumer" + }, + { + "user_role_id": "34c42896-a003-4653-af8f-ba06ca595754", + "language_short_name": "de", + "description": "Technischer User für die Invitation API zur Integration von Drittanbieter-Software." + }, + { + "user_role_id": "34c42896-a003-4653-af8f-ba06ca595754", + "language_short_name": "en", + "description": "Technical user enabling the invitation API to integrate 3rd party software." } ] diff --git a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_roles.json b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_roles.json index 3ee20a0609..854f7655b6 100644 --- a/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_roles.json +++ b/src/portalbackend/PortalBackend.Migrations/Seeder/Data/user_roles.json @@ -160,5 +160,11 @@ "user_role": "BPDM Pool Sharing Consumer", "offer_id": "0ffcb416-1101-4ba6-8d4a-a9dfa31745a4", "last_editor_id": null + }, + { + "id": "34c42896-a003-4653-af8f-ba06ca595754", + "user_role": "Registration Internal", + "offer_id": "9b957704-3505-4445-822c-d7ef80f27fcd", + "last_editor_id": null } ] diff --git a/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRoleCollectionRolesViewTests.cs b/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRoleCollectionRolesViewTests.cs index d8a86d112d..f27af43a74 100644 --- a/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRoleCollectionRolesViewTests.cs +++ b/tests/portalbackend/PortalBackend.DBAccess.Tests/CompanyRoleCollectionRolesViewTests.cs @@ -45,7 +45,7 @@ public async Task CompanyRoleCollectionRolesView_GetAll_ReturnsExpected() // Act var result = await sut.CompanyRoleCollectionRolesView.ToListAsync(); - result.Should().HaveCount(56); + result.Should().HaveCount(57); } [Fact]