Integration des Active Directory Controllers und Active Directory Service abgeschlossen.

This commit is contained in:
Developer 02
2024-03-11 08:48:40 +01:00
parent 58f87e2be5
commit df9bc33795
420 changed files with 2611 additions and 4118 deletions

View File

@@ -0,0 +1,16 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.User;
using System.DirectoryServices.AccountManagement;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class DirectoryMappingProfile : Profile
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
public DirectoryMappingProfile()
{
CreateMap<UserPrincipal, UserPrincipalDto>();
CreateMap<UserPrincipal, UserPrincipalReadDto>();
}
}
}

View File

@@ -21,7 +21,7 @@ namespace DigitalData.UserManager.Application.MappingProfiles
.ForMember(group => group.AdSync, opt => opt.MapFrom(adGroup => true))
.ForMember(group => group.Internal, opt => opt.MapFrom(adGroup => false))
.ForMember(group => group.Active, opt => opt.MapFrom(adGroup => true))
.ForMember(group => group.Name, opt => opt.MapFrom(adGroup => adGroup.SAMAccountName));
.ForMember(group => group.Name, opt => opt.MapFrom(adGroup => adGroup.Samaccountname.ElementAt(0)));
}
}
}