How to customize hangfire dashboard only show authenticated user's owned jobs?

Viewed 854

I am using hangfire and Hangfire.Dashboard.Authorization to configure access to hangfire dashboard:

public void Configure(IAppBuilder app)
{
    var options = new DashboardOptions
    {
        AuthorizationFilters = new [] 
        {
            new AuthorizationFilter { Users = "admin"},
            new ClaimsBasedAuthorizationFilter("name", "value")
        }
    };
    app.UseHangfireDashboard("/myjobs", options);

}

I would like to provide access to all authenticated users to dasboard but only allow view jobs what belongs to the current user (started by she/he). Is it possible somehow filter the dashboard access and results by the current user?

0 Answers
Related