From 07f01a18222f71dffcb121c1dcf61f29d10ff295 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Mon, 5 Jul 2021 14:36:51 +1000 Subject: [PATCH 1/4] Update for UserId TinyType --- source/Server/Server.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index 2fc6981..ad195f1 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -21,7 +21,7 @@ - + From a09f217bec50350a6588e4d4fba7d9dc3e9a9a95 Mon Sep 17 00:00:00 2001 From: Ryan Gribble Date: Mon, 5 Jul 2021 17:11:50 +1000 Subject: [PATCH 2/4] update Fakes for new interface --- .../TestHelpers/FakeUpdateableUserStore.cs | 15 +++++++-------- .../TestHelpers/FakeUser.cs | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs b/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs index 2dbf184..2bfd1a8 100644 --- a/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs +++ b/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs @@ -2,22 +2,21 @@ using System.Collections.Generic; using System.Threading; using Octopus.Data; -using Octopus.Data.Model; using Octopus.Data.Model.User; using Octopus.Data.Storage.User; using Octopus.Server.Extensibility.Authentication.HostServices; -using Octopus.Server.Extensibility.Authentication.Ldap.Configuration; +using Octopus.Server.MessageContracts.Features.Users; namespace Ldap.Integration.Tests.TestHelpers { internal class FakeUpdateableUserStore : IUpdateableUserStore { - public IUser AddIdentity(string userId, Identity identity, CancellationToken cancellationToken) + public IUser AddIdentity(UserId userId, Identity identity, CancellationToken cancellationToken) { throw new NotImplementedException(); } - public void ClearSecurityGroupIds(string provider, string userId) + public void ClearSecurityGroupIds(string provider, UserId userId) { throw new NotImplementedException(); } @@ -28,12 +27,12 @@ public IResult Create(string username, string displayName, string emailAd return Result.Success(new FakeUser(username, emailAddress, displayName, identities)); } - public void DisableUser(string userId) + public void DisableUser(UserId userId) { throw new NotImplementedException(); } - public void EnableUser(string userId) + public void EnableUser(UserId userId) { throw new NotImplementedException(); } @@ -64,12 +63,12 @@ public IUser GetByUsername(string username) throw new NotImplementedException(); } - public void SetSecurityGroupIds(string provider, string userId, IEnumerable ids, DateTimeOffset updated) + public void SetSecurityGroupIds(string provider, UserId userId, IEnumerable ids, DateTimeOffset updated) { throw new NotImplementedException(); } - public IUser UpdateIdentity(string userId, Identity identity, CancellationToken cancellationToken) + public IUser UpdateIdentity(UserId userId, Identity identity, CancellationToken cancellationToken) { throw new NotImplementedException(); } diff --git a/source/Ldap.Integration.Tests/TestHelpers/FakeUser.cs b/source/Ldap.Integration.Tests/TestHelpers/FakeUser.cs index 6bc4259..3973710 100644 --- a/source/Ldap.Integration.Tests/TestHelpers/FakeUser.cs +++ b/source/Ldap.Integration.Tests/TestHelpers/FakeUser.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Octopus.Data.Model.User; using Octopus.Server.Extensibility.Authentication.Ldap.Identities; +using Octopus.Server.MessageContracts.Features.Users; namespace Ldap.Integration.Tests.TestHelpers { @@ -31,7 +32,7 @@ public FakeUser(string userName, string email, string displayName, IEnumerable Identities { get; set; } - public string Id { get; set; } + public UserId Id { get; set; } public SecurityGroups GetSecurityGroups(string identityProviderName) { From 02adb21e23f4f6eb55051824dc900b5b3cdbd2b5 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Wed, 7 Jul 2021 18:01:32 +1000 Subject: [PATCH 3/4] package update --- source/Server/Server.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Server/Server.csproj b/source/Server/Server.csproj index ad195f1..c36785d 100644 --- a/source/Server/Server.csproj +++ b/source/Server/Server.csproj @@ -21,7 +21,7 @@ - + From ed681b5bcd42f3d387512653c19eebeded045a79 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Wed, 7 Jul 2021 18:05:35 +1000 Subject: [PATCH 4/4] fix for test after package update --- .../TestHelpers/FakeUpdateableUserStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs b/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs index 2bfd1a8..c715320 100644 --- a/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs +++ b/source/Ldap.Integration.Tests/TestHelpers/FakeUpdateableUserStore.cs @@ -42,7 +42,7 @@ public IUser[] GetByEmailAddress(string emailAddress) throw new NotImplementedException(); } - public IUser GetById(string userId) + public IUser GetById(UserId userId) { throw new NotImplementedException(); }