From 494484ee0bad8c330d7b55feb6294b133827e8e4 Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Thu, 5 Jun 2025 08:59:55 +0200 Subject: [PATCH] permit by default --- Pilz.Net/Api/ApiAuthCheckEventArgs.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Pilz.Net/Api/ApiAuthCheckEventArgs.cs b/Pilz.Net/Api/ApiAuthCheckEventArgs.cs index 1b2db59..b3942b1 100644 --- a/Pilz.Net/Api/ApiAuthCheckEventArgs.cs +++ b/Pilz.Net/Api/ApiAuthCheckEventArgs.cs @@ -4,22 +4,13 @@ namespace Pilz.Net.Api; public class ApiAuthCheckEventArgs(string authKey, Delegate? handler, HttpListenerContext context) : EventArgs { - private bool hasDenyed; - public HttpListenerContext Context { get; } = context; public Delegate? Handler { get; } = handler; public string AuthKey { get; } = authKey; - public bool Valid { get; set; } + public bool Valid { get; private set; } = true; public void Deny() { Valid = false; - hasDenyed = true; - } - - public void Permit() - { - if (!hasDenyed) - Valid = true; } }