Skip to content

Commit

Permalink
Apply hotfix 29.5.3 (#22)
Browse files Browse the repository at this point in the history
* Apply hotfix 29.5.3

* Replace obsolete API.
  • Loading branch information
BS-jiriceska authored Oct 17, 2024
1 parent 0308c44 commit 885f0ed
Show file tree
Hide file tree
Showing 10 changed files with 790 additions and 782 deletions.
10 changes: 5 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Duende.AccessTokenManagement.OpenIdConnect" Version="3.0.0" />
<PackageVersion Include="Kentico.Xperience.Admin" Version="29.3.3" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="29.3.3" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="29.3.3" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="29.3.3" />
<PackageVersion Include="Kentico.Xperience.Core" Version="29.3.3" />
<PackageVersion Include="Kentico.Xperience.Admin" Version="29.5.3" />
<PackageVersion Include="Kentico.Xperience.WebApp" Version="29.5.3" />
<PackageVersion Include="kentico.xperience.azurestorage" Version="29.5.3" />
<PackageVersion Include="kentico.xperience.imageprocessing" Version="29.5.3" />
<PackageVersion Include="Kentico.Xperience.Core" Version="29.5.3" />
<PackageVersion Include="Scrutor" Version="4.2.2" />
<PackageVersion Include="Microsoft.Extensions.ApiDescription.Client" Version="8.0.8" />
<PackageVersion Include="NSwag.ApiDescription.Client" Version="14.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ internal void RegisterSamples()
accountContactInfoProvider, accountInfoProvider, bizFormInfoProvider));
PersonalDataCollectorRegister.Instance.Add(new SampleMemberDataCollector());

PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider));
PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider));
PersonalDataEraserRegister.Instance.Add(new SampleMemberPersonalDataEraser(memberInfoProvider));

RegisterConsentRevokeHandler();
Expand All @@ -118,7 +118,7 @@ internal void DeleteContactActivities(ContactInfo contact)
{ "deleteActivities", true }
};

new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider)
new SampleContactPersonalDataEraser(consentAgreementInfoProvider, bizFormInfoProvider, accountContactInfoProvider, contactInfoProvider, activityInfoProvider)
.Erase(new[] { contact }, configuration);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class SampleContactPersonalDataEraser : IPersonalDataEraser
/// <remarks>
/// GUIDs are used to select only specific forms on the Dancing Goat sample sites.
/// </remarks>
private readonly Dictionary<Guid, string> dancingGoatForms = new Dictionary<Guid, string>
private readonly Dictionary<Guid, string> dancingGoatForms = new()
{
// DancingGoatCoreContactUsNew
{ new Guid("0081DC2E-47F4-4ACD-80AE-FE39612F379C"), "UserEmail" },
Expand All @@ -35,6 +35,7 @@ internal class SampleContactPersonalDataEraser : IPersonalDataEraser
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;
private readonly IInfoProvider<AccountContactInfo> accountContactInfoProvider;
private readonly IInfoProvider<ContactInfo> contactInfoProvider;
private readonly IInfoProvider<ActivityInfo> activityInfoProvider;


/// <summary>
Expand All @@ -44,16 +45,19 @@ internal class SampleContactPersonalDataEraser : IPersonalDataEraser
/// <param name="bizFormInfoProvider">BizForm info provider.</param>
/// <param name="accountContactInfoProvider">Account contact info provider.</param>
/// <param name="contactInfoProvider">Contact info provider.</param>
/// <param name="activityInfoProvider">Activity info provider.</param>
public SampleContactPersonalDataEraser(
IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider,
IInfoProvider<BizFormInfo> bizFormInfoProvider,
IInfoProvider<AccountContactInfo> accountContactInfoProvider,
IInfoProvider<ContactInfo> contactInfoProvider)
IInfoProvider<ContactInfo> contactInfoProvider,
IInfoProvider<ActivityInfo> activityInfoProvider)
{
this.consentAgreementInfoProvider = consentAgreementInfoProvider;
this.bizFormInfoProvider = bizFormInfoProvider;
this.accountContactInfoProvider = accountContactInfoProvider;
this.contactInfoProvider = contactInfoProvider;
this.activityInfoProvider = activityInfoProvider;
}


Expand Down Expand Up @@ -115,7 +119,7 @@ private void DeleteSubmittedFormsActivities(ICollection<int> contactIds, IDictio
if (configuration.TryGetValue("DeleteSubmittedFormsActivities", out object deleteSubmittedFormsActivities)
&& ValidationHelper.GetBoolean(deleteSubmittedFormsActivities, false))
{
ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereEquals("ActivityType", PredefinedActivityType.BIZFORM_SUBMIT)
activityInfoProvider.BulkDelete(new WhereCondition().WhereEquals("ActivityType", PredefinedActivityType.BIZFORM_SUBMIT)
.WhereIn("ActivityContactID", contactIds));
}
}
Expand Down Expand Up @@ -169,7 +173,7 @@ private void DeleteActivities(List<int> contactIds, IDictionary<string, object>
if (configuration.TryGetValue("deleteActivities", out object deleteActivities)
&& ValidationHelper.GetBoolean(deleteActivities, false))
{
ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereIn("ActivityContactID", contactIds));
activityInfoProvider.BulkDelete(new WhereCondition().WhereIn("ActivityContactID", contactIds));
}
}

Expand Down
Loading

0 comments on commit 885f0ed

Please sign in to comment.