From d61140c349235e7e31a9f829e417d11457dbb347 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 25 Oct 2024 10:58:02 +0200 Subject: [PATCH] =?UTF-8?q?feat(API):=20Verzeichnis-Suchdienst=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WorkFlow.API/Program.cs | 3 +++ WorkFlow.API/appsettings.json | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/WorkFlow.API/Program.cs b/WorkFlow.API/Program.cs index cd50234..ef4c685 100644 --- a/WorkFlow.API/Program.cs +++ b/WorkFlow.API/Program.cs @@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore; using WorkFlow.Infrastructure; using Microsoft.AspNetCore.Authentication.Cookies; using DigitalData.Core.API; +using DigitalData.Core.Application; var builder = WebApplication.CreateBuilder(args); var config = builder.Configuration; @@ -13,6 +14,8 @@ var cnn_str = config.GetConnectionString("Default") ?? throw new ("Default conne builder.Services.AddDbContext(options => options.UseSqlServer(cnn_str).EnableDetailedErrors()); builder.Services.AddWorkFlow().AddUserManager(); builder.Services.AddCookieBasedLocalizer(); +builder.ConfigureBySection(); +builder.Services.AddDirectorySearchService(); builder.Services.AddControllers(); diff --git a/WorkFlow.API/appsettings.json b/WorkFlow.API/appsettings.json index a78d677..d3fe520 100644 --- a/WorkFlow.API/appsettings.json +++ b/WorkFlow.API/appsettings.json @@ -8,5 +8,14 @@ "AllowedHosts": "*", "ConnectionStrings": { "Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=g+2edXEbMbujCUjh7INZRQ==;Password=Bz/n9pu8EyzlVqicaMRQGQ==;Encrypt=false;TrustServerCertificate=True;" + }, + "DirectorySearchOptions": { + "ServerName": "DD-VMP01-DC01", + "Root": "DC=dd-gan,DC=local,DC=digitaldata,DC=works", + "UserCacheExpirationDays": 1, + "CustomSearchFilters": { + "User": "(&(objectClass=user)(sAMAccountName=*))", + "Group": "(&(objectClass=group) (samAccountName=*))" + } } } \ No newline at end of file