diff --git a/src/Altinn.App.Api/Controllers/DataController.cs b/src/Altinn.App.Api/Controllers/DataController.cs index 105f55c7e..b71ae203e 100644 --- a/src/Altinn.App.Api/Controllers/DataController.cs +++ b/src/Altinn.App.Api/Controllers/DataController.cs @@ -1,6 +1,5 @@ using System.Globalization; using System.Net; -using System.Security.Claims; using System.Text.Json; using Altinn.App.Api.Helpers; using Altinn.App.Api.Helpers.RequestHandling; diff --git a/src/Altinn.App.Api/Controllers/UserDefinedMetadataController.cs b/src/Altinn.App.Api/Controllers/UserDefinedMetadataController.cs index ec6d46f6a..d5fd95067 100644 --- a/src/Altinn.App.Api/Controllers/UserDefinedMetadataController.cs +++ b/src/Altinn.App.Api/Controllers/UserDefinedMetadataController.cs @@ -68,7 +68,7 @@ [FromRoute] Guid dataGuid ) { Instance instance = await _instanceClient.GetInstance(app, org, instanceOwnerPartyId, instanceGuid); - DataElement? dataElement = instance.Data.FirstOrDefault(m => + DataElement? dataElement = instance.Data.Find(m => m.Id.Equals(dataGuid.ToString(), StringComparison.OrdinalIgnoreCase) ); @@ -116,7 +116,7 @@ [FromBody] UserDefinedMetadataDto userDefinedMetadataDto } Instance instance = await _instanceClient.GetInstance(app, org, instanceOwnerPartyId, instanceGuid); - DataElement? dataElement = instance.Data.FirstOrDefault(m => + DataElement? dataElement = instance.Data.Find(m => m.Id.Equals(dataGuid.ToString(), StringComparison.OrdinalIgnoreCase) ); diff --git a/src/Altinn.App.Api/Helpers/ValidContributorHelper.cs b/src/Altinn.App.Api/Helpers/ValidContributorHelper.cs index 63dfc54e2..c409cf727 100644 --- a/src/Altinn.App.Api/Helpers/ValidContributorHelper.cs +++ b/src/Altinn.App.Api/Helpers/ValidContributorHelper.cs @@ -7,7 +7,7 @@ namespace Altinn.App.Api.Helpers; /// Helper class for validating if a user is a valid contributor to a data type. /// /// -/// TODO: The concept of inline authorization of valid contributors is not widely used and is likely not the best approach for doing authorization on the data type level, but there is no support for it yet in the policy based authorization, so keeping for now. +/// The concept of inline authorization of valid contributors is not widely used and is likely not the best approach for doing authorization on the data type level, but there is no support for it yet in the policy based authorization, so keeping for now. /// internal static class ValidContributorHelper {