From f48205f5bb6e07394ca5c5202c84b6d785d94104 Mon Sep 17 00:00:00 2001 From: Frederik Nielsen Date: Tue, 15 Oct 2024 10:29:36 +0200 Subject: [PATCH 1/2] Adding GetId --- ...b.DataIntegration.Providers.UserProvider.csproj | 3 ++- src/UserProvider.cs | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj b/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj index b336f56..121eaf2 100644 --- a/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj +++ b/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj @@ -1,6 +1,6 @@  - 10.8.0 + 10.8.1 1.0.0.0 User Provider User Provider @@ -25,5 +25,6 @@ + diff --git a/src/UserProvider.cs b/src/UserProvider.cs index 3ca674a..d1dc413 100644 --- a/src/UserProvider.cs +++ b/src/UserProvider.cs @@ -1,4 +1,5 @@ -using Dynamicweb.Data; +using Dynamicweb.Core; +using Dynamicweb.Data; using Dynamicweb.DataIntegration.Integration; using Dynamicweb.DataIntegration.Integration.Interfaces; using Dynamicweb.DataIntegration.ProviderHelpers; @@ -6,7 +7,6 @@ using Dynamicweb.Extensibility.Editors; using Dynamicweb.Logging; using Dynamicweb.Security.UserManagement.Common.SystemFields; -using Microsoft.CodeAnalysis; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -19,7 +19,7 @@ namespace Dynamicweb.DataIntegration.Providers.UserProvider; [AddInName("Dynamicweb.DataIntegration.Providers.Provider"), AddInLabel("User Provider"), AddInDescription("User provider"), AddInIgnore(false)] -public class UserProvider : BaseSqlProvider, IParameterOptions +public class UserProvider : BaseSqlProvider, IParameterOptions, ISource, IDestination { private Job _job = null; private UserDestinationWriter Writer = null; @@ -541,9 +541,15 @@ public override void SaveAsXml(XmlTextWriter xmlTextWriter) xmlTextWriter.WriteElementString("ImportUsersBelongExactlyImportGroups", ImportUsersBelongExactlyImportGroups.ToString(CultureInfo.CurrentCulture)); xmlTextWriter.WriteElementString("RepositoriesIndexUpdate", RepositoriesIndexUpdate); xmlTextWriter.WriteElementString("SkipFailingRows", SkipFailingRows.ToString(CultureInfo.CurrentCulture)); - GetSchema().SaveAsXml(xmlTextWriter); + if (!Feature.IsActive()) + GetSchema().SaveAsXml(xmlTextWriter); } + string ISource.GetId() => "Source|UserProvider"; + + string IDestination.GetId() => "Destination|UserProvider"; + + public override void UpdateSourceSettings(ISource source) { UserProvider newProvider = (UserProvider)source; From 205f4da99d329d96fc446fcf75759934e4a58ae8 Mon Sep 17 00:00:00 2001 From: frederik5480 Date: Tue, 15 Oct 2024 10:31:02 +0200 Subject: [PATCH 2/2] Update Dynamicweb.DataIntegration.Providers.UserProvider.csproj --- src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj b/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj index 121eaf2..810aadd 100644 --- a/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj +++ b/src/Dynamicweb.DataIntegration.Providers.UserProvider.csproj @@ -25,6 +25,5 @@ -