From 7efc77ca51e9da83892039793d925146d5275093 Mon Sep 17 00:00:00 2001 From: TekH Date: Sun, 12 Jul 2026 00:04:25 +0200 Subject: [PATCH] feat: Add AllowAllDashboardAuthorizationFilter for development - Create authorization filter to bypass Hangfire dashboard authentication - Allow unrestricted access to /hangfire dashboard for local development - Note: Should be replaced with proper authentication in production --- .../AllowAllDashboardAuthorizationFilter.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ECMJobRunner.WebCron/AllowAllDashboardAuthorizationFilter.cs diff --git a/ECMJobRunner.WebCron/AllowAllDashboardAuthorizationFilter.cs b/ECMJobRunner.WebCron/AllowAllDashboardAuthorizationFilter.cs new file mode 100644 index 0000000..38a0616 --- /dev/null +++ b/ECMJobRunner.WebCron/AllowAllDashboardAuthorizationFilter.cs @@ -0,0 +1,17 @@ +using Hangfire.Dashboard; + +namespace ECMJobRunner.WebCron +{ + /// + /// Authorization filter that allows all users to access Hangfire Dashboard + /// WARNING: This is for development only! Use proper authentication in production. + /// + public class AllowAllDashboardAuthorizationFilter : IDashboardAuthorizationFilter + { + public bool Authorize(DashboardContext context) + { + // Allow all users - FOR DEVELOPMENT ONLY + return true; + } + } +}