chore(auth): MxGateway unify dev LDAP base DN to dc=zb,dc=local (Task 1.6)
This commit is contained in:
@@ -219,7 +219,7 @@ public sealed class DashboardAuthenticatorTests
|
||||
[Fact]
|
||||
public async Task AuthenticateAsync_GroupAsDistinguishedNameFromService_ResolvesRoleAndSurfacesServiceValue()
|
||||
{
|
||||
const string groupDn = "ou=GwAdmin,ou=groups,dc=lmxopcua,dc=local";
|
||||
const string groupDn = "ou=GwAdmin,ou=groups,dc=zb,dc=local";
|
||||
FakeLdapAuthService ldap = new(LdapAuthResult.Success(
|
||||
username: "admin",
|
||||
displayName: "admin",
|
||||
|
||||
@@ -38,7 +38,7 @@ public sealed class DashboardGroupRoleMapperTests
|
||||
[Theory]
|
||||
[InlineData("GwAdmin", DashboardRoles.Admin)]
|
||||
[InlineData("gwadmin", DashboardRoles.Admin)]
|
||||
[InlineData("ou=GwAdmin,ou=groups,dc=lmxopcua,dc=local", DashboardRoles.Admin)]
|
||||
[InlineData("ou=GwAdmin,ou=groups,dc=zb,dc=local", DashboardRoles.Admin)]
|
||||
[InlineData("OtherGroup", null)]
|
||||
public async Task MapAsync_ResolvesByShortNameAndDistinguishedName(
|
||||
string ldapGroup,
|
||||
@@ -94,7 +94,7 @@ public sealed class DashboardGroupRoleMapperTests
|
||||
{
|
||||
Dictionary<string, string> mapping = StandardMapping();
|
||||
DashboardGroupRoleMapper mapper = CreateMapper(mapping);
|
||||
string[] groups = ["ou=GwAdmin,ou=groups,dc=lmxopcua,dc=local", "gwreader"];
|
||||
string[] groups = ["ou=GwAdmin,ou=groups,dc=zb,dc=local", "gwreader"];
|
||||
|
||||
IReadOnlyList<string> helperRoles = DashboardGroupRoleMapping.MapGroupsToRoles(groups, mapping);
|
||||
GroupRoleMapping<string> mapperResult = await mapper.MapAsync(groups, CancellationToken.None);
|
||||
|
||||
Reference in New Issue
Block a user