From 15bc34ba950ef66299f5fd002266a5e381f05d1f Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 9 Sep 2024 11:50:38 +0200 Subject: [PATCH] =?UTF-8?q?chore(config):=20Verbindungsschl=C3=BCssel=20um?= =?UTF-8?q?benennen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalData.UserManager.API/Controllers/DirectoryController.cs | 2 ++ DigitalData.UserManager.API/Program.cs | 3 +-- DigitalData.UserManager.API/appsettings.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DigitalData.UserManager.API/Controllers/DirectoryController.cs b/DigitalData.UserManager.API/Controllers/DirectoryController.cs index 35bf4e2..cf62c6f 100644 --- a/DigitalData.UserManager.API/Controllers/DirectoryController.cs +++ b/DigitalData.UserManager.API/Controllers/DirectoryController.cs @@ -8,11 +8,13 @@ using System.Security.Claims; using DigitalData.UserManager.Application; using Microsoft.Extensions.Localization; using DigitalData.Core.DTO; +using Microsoft.AspNetCore.Authorization; namespace DigitalData.UserManager.API.Controllers { [Route("api/[controller]")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "")] + [Authorize] public class DirectoryController : ControllerBase { private readonly IUserService _userService; diff --git a/DigitalData.UserManager.API/Program.cs b/DigitalData.UserManager.API/Program.cs index 415cd1a..2702e1c 100644 --- a/DigitalData.UserManager.API/Program.cs +++ b/DigitalData.UserManager.API/Program.cs @@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Authentication.Cookies; using NLog.Web; using NLog; using DigitalData.Core.API; -using DigitalData.UserManager.API; using DigitalData.UserManager.API.Controllers; using DigitalData.UserManager.Application.Services; @@ -83,7 +82,7 @@ try { cnn_str = new(() => { var encryptor = app.Services.GetRequiredService(); - var eCnnStr = config.GetConnectionString("DD_ECM_Connection") ?? throw new InvalidOperationException("Connection string 'DD_ECM_Connection' is missing from the configuration."); + var eCnnStr = config.GetConnectionString("UM_DEF") ?? throw new InvalidOperationException("Connection string 'DD_ECM_Connection' is missing from the configuration."); var cnnStr = encryptor.Decrypt(eCnnStr); return cnnStr; }); diff --git a/DigitalData.UserManager.API/appsettings.json b/DigitalData.UserManager.API/appsettings.json index e00ec43..e89d3ff 100644 --- a/DigitalData.UserManager.API/appsettings.json +++ b/DigitalData.UserManager.API/appsettings.json @@ -6,7 +6,8 @@ } }, "ConnectionStrings": { - "DD_ECM_Connection": "cIFSoeMqHel7SDkAj4MWjy1UHrNJgoHrLkBJ/I/1Y95MsV9vFQjJLn6Shm9qtAyymwSNrX9s+78mW2PX4KulSA/KAaRwNQteP6SHrX0nNOJptot8TcohuiT0m9K2M/GsJEnLyJ+3yb0nJHR5yzRaVvjl8ERhgntW47dFMni98YA=" + "UM_DEF": "cIFSoeMqHel7SDkAj4MWjy1UHrNJgoHrLkBJ/I/1Y95MsV9vFQjJLn6Shm9qtAyymwSNrX9s+78mW2PX4KulSA/KAaRwNQteP6SHrX0nNOJptot8TcohuiT0m9K2M/GsJEnLyJ+3yb0nJHR5yzRaVvjl8ERhgntW47dFMni98YA=", + "Decrypted": "Server=SDD-VMP04-SQL17\\\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;" }, "AllowedOrigins": [ "https://localhost:7103", "http://172.24.12.39:85", "http://localhost:85", "http://localhost:4200", "http://localhost:5500", "https://localhost:7202" ], "RunAsWindowsService": false,