From a5773e9b8fa1491d8a234ccbb04ba9ef8f1d6e0e Mon Sep 17 00:00:00 2001 From: pitzm Date: Mon, 7 Sep 2026 17:03:31 +0200 Subject: [PATCH] ZUGFeRDService & ZUGFeRDRESTService: Neuer Config-Schalter "AllowEBInterface" --- Services.ZUGFeRDService/Config.vb | 2 ++ Services.ZUGFeRDService/ThreadRunner.vb | 1 + WEBSERVICES/ZUGFeRDRESTService/Config.cs | 2 ++ .../Controllers/ValidationController.cs | 10 +++++++++- .../ZUGFeRDRESTService/appsettings.Development.json | 3 ++- WEBSERVICES/ZUGFeRDRESTService/appsettings.json | 3 ++- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Services.ZUGFeRDService/Config.vb b/Services.ZUGFeRDService/Config.vb index b13b0f4c..147ffca7 100644 --- a/Services.ZUGFeRDService/Config.vb +++ b/Services.ZUGFeRDService/Config.vb @@ -74,5 +74,7 @@ Public Property AllowZugferd23x As Boolean = True Public Property AllowPeppolBISBill3x As Boolean = False + + Public Property AllowEBInterface As Boolean = False End Class End Class diff --git a/Services.ZUGFeRDService/ThreadRunner.vb b/Services.ZUGFeRDService/ThreadRunner.vb index 96982dbe..389d0c19 100644 --- a/Services.ZUGFeRDService/ThreadRunner.vb +++ b/Services.ZUGFeRDService/ThreadRunner.vb @@ -54,6 +54,7 @@ Public Class ThreadRunner .AllowZugferd2x = _config.Config.Custom.AllowZugferd2x, .AllowZugferd23x = _config.Config.Custom.AllowZugferd23x, .AllowPeppolBISBill3x = _config.Config.Custom.AllowPeppolBISBill3x, + .AllowEBInterface = _config.Config.Custom.AllowEBInterface, .RejectionTemplateId = _config.Config.Custom.RejectionTemplateId, .GDPictureVersion = _config.Config.Custom.GDPictureVersion } diff --git a/WEBSERVICES/ZUGFeRDRESTService/Config.cs b/WEBSERVICES/ZUGFeRDRESTService/Config.cs index babad014..9d51b30d 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/Config.cs +++ b/WEBSERVICES/ZUGFeRDRESTService/Config.cs @@ -29,6 +29,8 @@ public bool AllowPeppolBISBill3x { get; set; } = false; + public bool AllowEBInterface { get; set; } = false; + } } diff --git a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs index 790c3623..ce5b797e 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs +++ b/WEBSERVICES/ZUGFeRDRESTService/Controllers/ValidationController.cs @@ -80,6 +80,7 @@ namespace ZUGFeRDRESTService.Controllers private bool _AllowZugferd23x; private bool _AllowZugferd10; private bool _AllowPeppolBISBill3x; + private bool _AllowEBInterface; private string _GDPictureVersion; @@ -104,7 +105,8 @@ namespace ZUGFeRDRESTService.Controllers AllowZugferd_1_0_Schema = _AllowZugferd10, AllowZugferd_2_x_Schema = _AllowZugferd2x, AllowZugferd_2_3_x_Schema = _AllowZugferd23x, - AllowPeppol_3_x_Schema = _AllowPeppolBISBill3x + AllowPeppol_3_x_Schema = _AllowPeppolBISBill3x, + AllowEBInterface_Schema = _AllowEBInterface, }); _props = new PropertyValues(_logConfig); @@ -188,6 +190,12 @@ namespace ZUGFeRDRESTService.Controllers _AllowPeppolBISBill3x = false; } + if (!bool.TryParse(oZugferdConfig["AllowEBInterface"], out _AllowEBInterface)) + { + _logger.Info("Configuration AllowEBInterface was not set. Using default value [{0}]", false); + _AllowEBInterface = false; + } + _GDPictureVersion = oAppConfig["GDPictureVersion"]; if (string.IsNullOrEmpty(_GDPictureVersion)) { diff --git a/WEBSERVICES/ZUGFeRDRESTService/appsettings.Development.json b/WEBSERVICES/ZUGFeRDRESTService/appsettings.Development.json index 1bf7cf67..88f6d17f 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/appsettings.Development.json +++ b/WEBSERVICES/ZUGFeRDRESTService/appsettings.Development.json @@ -24,7 +24,8 @@ "AllowZugferd23x": true, "AllowFacturX": true, "AllowXRechnung": true, - "AllowPeppolBISBill3x": true + "AllowPeppolBISBill3x": true, + "AllowEBInterface": true }, "GDPictureVersion": "", "MaxFileSizeInMegabytes": 25 diff --git a/WEBSERVICES/ZUGFeRDRESTService/appsettings.json b/WEBSERVICES/ZUGFeRDRESTService/appsettings.json index 4b8199cd..3e2be990 100644 --- a/WEBSERVICES/ZUGFeRDRESTService/appsettings.json +++ b/WEBSERVICES/ZUGFeRDRESTService/appsettings.json @@ -24,7 +24,8 @@ "AllowZugferd23x": false, "AllowFacturX": false, "AllowXRechnung": false, - "AllowPeppolBISBill3x": false + "AllowPeppolBISBill3x": false, + "AllowEBInterface": false }, "GDPictureVersion": "", "MaxFileSizeInMegabytes": 25