Skip to content

Commit

Permalink
release(1.6.0-RC8): merge release into main #226
Browse files Browse the repository at this point in the history
Reviewed-By: Evelyn Gurschler <[email protected]>
  • Loading branch information
Phil91 authored Aug 22, 2023
2 parents aa5c97d + 12ea3fc commit c1922e2
Show file tree
Hide file tree
Showing 44 changed files with 827 additions and 20 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

New features, fixed bugs, known defects and other noteworthy changes to each release of the Catena-X Portal Backend.

## 1.6.0-RC8

### Change
* Administration Service
* remove PUT: users/{companyUserId}/resetpassword
* Marketplace Service:
* add GET: /api/apps/owncompany/activesubscriptions
* add GET: /api/Apps/owncompany/subscriptions

### Technical Support
* Iam Seeding
* change base image from aspnet to runtime
* change name in Docker Hub notice
* Migration Jobs
* change base image from aspnet to runtime
* All Services
* add missing file headers

## 1.6.0-RC7

### Change
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-iam-seeding
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS base
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine AS base

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-portal-migrations
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS base
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine AS base

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile-provisioning-migrations
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS base
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine AS base

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion docker/notice-iam-seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DockerHub: [https://hub.docker.com/r/tractusx/portal-iam-seeding](https://hub.do

Eclipse Tractus-X product(s) installed within the image:

__Portal Checklist Worker__
__Portal IAM Seeding job__

- GitHub: https://github.com/eclipse-tractusx/portal-backend
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.6.0</VersionPrefix>
<VersionSuffix>RC7</VersionSuffix>
<VersionSuffix>RC8</VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,6 @@ public Task<CompanyUserDetails> UpdateOwnUserDetails([FromRoute] Guid companyUse
public Task<int> DeleteOwnUser([FromRoute] Guid companyUserId) =>
this.WithUserId(userId => _logic.DeleteOwnUserAsync(companyUserId, userId));

[Obsolete("to be replaced by endpoint /user/owncompany/users/{companyUserId}/resetPassword. remove as soon frontend is adjusted")]
[HttpPut]
[Authorize(Roles = "modify_user_account")]
[Route("users/{companyUserId}/resetpassword")]
public Task<bool> ResetUserPassword([FromRoute] Guid companyUserId) =>
this.WithUserIdAndCompanyId(identity => _logic.ExecuteOwnCompanyUserPasswordReset(companyUserId, identity));

/// <summary>
/// Get for given app id all the company assigned users
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;

namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models;
Expand Down
19 changes: 19 additions & 0 deletions src/externalsystems/Bpdm.Library/Models/BpdmSharingState.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

namespace Org.Eclipse.TractusX.Portal.Backend.Bpdm.Library.Models;

public record BpdmPaginationSharingStateOutput(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using Newtonsoft.Json.Serialization;
using System.Text.Json;

Expand Down
19 changes: 19 additions & 0 deletions src/framework/Framework.Token/GetTokenSettings.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

namespace Org.Eclipse.TractusX.Portal.Backend.Framework.Token;

public record GetTokenSettings(string HttpClientName, string Username, string Password, string ClientId, string GrantType, string ClientSecret, string Scope);
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,12 @@ public Task<AppProviderSubscriptionDetailData> GetSubscriptionDetailForProvider(
/// <inheritdoc />
public Task<SubscriberSubscriptionDetailData> GetSubscriptionDetailForSubscriber(Guid appId, Guid subscriptionId, Guid companyId) =>
_offerService.GetSubscriptionDetailsForSubscriberAsync(appId, subscriptionId, companyId, OfferTypeId.APP, _settings.SalesManagerRoles);

/// <inheritdoc />
public IAsyncEnumerable<ActiveOfferSubscriptionStatusData> GetOwnCompanyActiveSubscribedAppSubscriptionStatusesForUserAsync(Guid companyId) =>
_portalRepositories.GetInstance<IOfferSubscriptionsRepository>().GetOwnCompanyActiveSubscribedOfferSubscriptionStatusesUntrackedAsync(companyId, OfferTypeId.APP, DocumentTypeId.APP_LEADIMAGE);

/// <inheritdoc />
public IAsyncEnumerable<OfferSubscriptionData> GetOwnCompanySubscribedAppOfferSubscriptionDataForUserAsync(Guid companyId) =>
_portalRepositories.GetInstance<IOfferSubscriptionsRepository>().GetOwnCompanySubscribedOfferSubscriptionUntrackedAsync(companyId, OfferTypeId.APP);
}
14 changes: 14 additions & 0 deletions src/marketplace/Apps.Service/BusinessLogic/IAppsBusinessLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,18 @@ public interface IAppsBusinessLogic
/// <param name="companyId">Id of the users company</param>
/// <returns>Returns the details of the subscription</returns>
Task<SubscriberSubscriptionDetailData> GetSubscriptionDetailForSubscriber(Guid appId, Guid subscriptionId, Guid companyId);

/// <summary>
/// Retrieves Active subscription statuses of subscribed apps of the provided user's company.
/// </summary>
/// <param name="companyId">Id of the users company.</param>
/// <returns>Returns the details of the Active subscription status for App user</returns>
IAsyncEnumerable<ActiveOfferSubscriptionStatusData> GetOwnCompanyActiveSubscribedAppSubscriptionStatusesForUserAsync(Guid companyId);

/// <summary>
/// Retrieves Active and Pending subscription statuses of subscribed apps of the provided user's company.
/// </summary>
/// <param name="companyId">Id of the users company.</param>
/// <returns>Returns the details of the Active and Pending subscription status for App user</returns>
IAsyncEnumerable<OfferSubscriptionData> GetOwnCompanySubscribedAppOfferSubscriptionDataForUserAsync(Guid companyId);
}
31 changes: 31 additions & 0 deletions src/marketplace/Apps.Service/Controllers/AppsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,35 @@ public Task<AppProviderSubscriptionDetailData> GetSubscriptionDetailForProvider(
[ProducesResponseType(typeof(ErrorResponse), StatusCodes.Status404NotFound)]
public Task<SubscriberSubscriptionDetailData> GetSubscriptionDetailForSubscriber([FromRoute] Guid appId, [FromRoute] Guid subscriptionId) =>
this.WithCompanyId(companyId => _appsBusinessLogic.GetSubscriptionDetailForSubscriber(appId, subscriptionId, companyId));

/// <summary>
/// Retrieves Active subscription statuses of apps.
/// </summary>
/// <remarks>Example: GET: /api/apps/subscribed/activesubscriptions</remarks>
/// <response code="200">Returns list of applicable active apps subscription statuses.</response>
/// <response code="400">If sub claim is empty/invalid or user does not exist.</response>
[HttpGet]
[Route("subscribed/activesubscriptions")]
[Authorize(Roles = "view_subscription")]
[Authorize(Policy = PolicyTypes.ValidCompany)]
[ProducesResponseType(typeof(ActiveOfferSubscriptionStatusData), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ErrorResponse), StatusCodes.Status400BadRequest)]
public IAsyncEnumerable<ActiveOfferSubscriptionStatusData> GetOwnCompanyActiveSubscribedAppSubscriptionStatusesForUserAsync() =>
this.WithCompanyId(companyId => _appsBusinessLogic.GetOwnCompanyActiveSubscribedAppSubscriptionStatusesForUserAsync(companyId));

/// <summary>
/// Retrieves subscription statuses of apps.
/// </summary>
/// <remarks>Example: GET: /api/apps/subscribed/subscriptions</remarks>
/// <response code="200">Returns list of applicable active apps subscription statuses.</response>
/// <response code="400">If sub claim is empty/invalid or user does not exist.</response>
[HttpGet]
[Route("subscribed/subscriptions")]
[Authorize(Roles = "view_subscription")]
[Authorize(Policy = PolicyTypes.ValidCompany)]
[ProducesResponseType(typeof(OfferSubscriptionData), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ErrorResponse), StatusCodes.Status400BadRequest)]
public IAsyncEnumerable<OfferSubscriptionData> GetOwnCompanySubscribedAppOfferSubscriptionDataForUserAsync() =>
this.WithCompanyId(companyId => _appsBusinessLogic.GetOwnCompanySubscribedAppOfferSubscriptionDataForUserAsync(companyId));

}
19 changes: 19 additions & 0 deletions src/marketplace/Apps.Service/Extensions/AppExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using Org.Eclipse.TractusX.Portal.Backend.Apps.Service.ViewModels;
using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories;
Expand Down
19 changes: 19 additions & 0 deletions src/marketplace/Offers.Library/Models/OfferDeclineRequest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using System.Text.Json.Serialization;

namespace Org.Eclipse.TractusX.Portal.Backend.Offers.Library.Models;
Expand Down
19 changes: 19 additions & 0 deletions src/portalbackend/PortalBackend.DBAccess/Models/AppUseCaseData.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;

public record AppUseCaseData(Guid Id, string Label);
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;

namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
********************************************************************************/

using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;
using System.Text.Json.Serialization;

namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;

Expand All @@ -28,12 +29,36 @@ namespace Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;
/// <param name="OfferId">Id of the Offer</param>
/// <param name="OfferName">Name of the Offer</param>
/// <param name="Provider">When called from /provider name of the company subscribing the offer, otherwise the provider company's name</param>
/// <param name="OfferSubscriptionStatus">Status of the offer subscription</param>
/// <param name="OfferSubscriptionStatusId">Status of the offer subscription</param>
/// <param name="DocumentId">Id of the documents</param>
public record OfferSubscriptionStatusData(
Guid OfferId,
string? OfferName,
string Provider,
OfferSubscriptionStatusId OfferSubscriptionStatusId,
Guid? DocumentId
[property: JsonPropertyName("offerId")] Guid OfferId,
[property: JsonPropertyName("name")] string? OfferName,
[property: JsonPropertyName("provider")] string Provider,
[property: JsonPropertyName("status")] OfferSubscriptionStatusId OfferSubscriptionStatusId,
[property: JsonPropertyName("image")] Guid? DocumentId
);

/// <summary>
/// Offer Subscriptions Status Data
/// </summary>
/// <param name="OfferId">Id of the Offer</param>
/// <param name="OfferName">Name of the Offer</param>
/// <param name="Provider">When called from /provider name of the company subscribing the offer, otherwise the provider company's name</param>
/// <param name="DocumentId">Id of the documents</param>
public record ActiveOfferSubscriptionStatusData(
[property: JsonPropertyName("offerId")] Guid OfferId,
[property: JsonPropertyName("name")] string? OfferName,
[property: JsonPropertyName("provider")] string Provider,
[property: JsonPropertyName("image")] Guid? DocumentId
);

/// <summary>
/// Offer Subscription data
/// </summary>
/// <param name="OfferId">Id of the Offer</param>
/// <param name="OfferSubscriptionStatusId">Status of the offer subscription</param>
public record OfferSubscriptionData(
[property: JsonPropertyName("offerId")] Guid OfferId,
[property: JsonPropertyName("status")] OfferSubscriptionStatusId OfferSubscriptionStatusId
);
Loading

0 comments on commit c1922e2

Please sign in to comment.