security(web): secure Hangfire Dashboard with cookie authentication filter
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 24s
Prepare Release / Build & Create Release (push) Successful in 1m0s
Prepare Release / Release Notification (push) Successful in 1s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 1m58s
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 24s
Prepare Release / Build & Create Release (push) Successful in 1m0s
Prepare Release / Release Notification (push) Successful in 1s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 1m58s
This commit is contained in:
@@ -328,8 +328,7 @@ public class HangfireAuthorizationFilter : IDashboardAuthorizationFilter
|
||||
{
|
||||
public bool Authorize(DashboardContext context)
|
||||
{
|
||||
// TODO: Implement proper authorization check
|
||||
// For now, allow all in development
|
||||
return true;
|
||||
var httpContext = context.GetHttpContext();
|
||||
return httpContext.User.Identity?.IsAuthenticated == true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user