You can do one of the following to prevent inadvertent or unauthorized dashboard modifications and protect dashboards stored on a server:
- Handle the DashboardConfigurator.VerifyClientTrustLevel event and set e.ClientTrustLevel to
Restricted
mode. - Derive a custom dashboard controller from RestrictedDashboardController instead of DashboardController.
The example shows how to create a restricted dashboard controller for the Web Dashboard in an ASP.NET Core application.
Inherit the RestrictedDashboardController class to create a custom dashboard controller. Add its name (without a Controller
prefix) to the following places:
- The RouteBuilderExtension.MapDashboardRoute method when you configure routing;
- The DashboardBuilder.ControllerName method when you configure a control on the page.
In this example, the custom controller name is DefaultDashboard
.
- Dashboard for MVC - How to create a restricted dashboard controller
- Dashboard for ASP.NET Core - How to implement authentication
- Dashboard for ASP.NET Core - How to implement multi-tenant Dashboard architecture
- Dashboard for ASP.NET Core - How to load different data based on the current user
(you will be redirected to DevExpress.com to submit your response)