Integration des Active Directory Controllers und Active Directory Service abgeschlossen.
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user