Back to Devexpress

VerifyClientTrustLevelEventArgs.ClientTrustLevel Property

dashboard-devexpress-dot-dashboardweb-dot-verifyclienttrustleveleventargs.md

latest4.1 KB
Original Source

VerifyClientTrustLevelEventArgs.ClientTrustLevel Property

Gets or sets the trust level that specifies which actions a client can initiate on the server.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.dll

NuGet Package : DevExpress.Web.Dashboard.Common

Declaration

csharp
public ClientTrustLevel ClientTrustLevel { get; set; }
vb
Public Property ClientTrustLevel As ClientTrustLevel

Property Value

TypeDescription
ClientTrustLevel

A ClientTrustLevel value that specifies a trust level.

|

Available values:

NameDescription
Full

A client can initiate any action to execute them on a server side.

| | Restricted |

A client cannot initiate actions that can lead to changing a dashboard stored on a server. This trust level can be used to prevent inadvertent or unauthorized modifications to dashboards.

|

Remarks

Use the ClientTrustLevel property to verify the trust level used to specify which actions a client can initiate on the server.

Restricted  mode affects the Web Dashboard in the following manner:

  • Only dashboards stored in dashboard storage can be processed on the client. Designer mode does not work.

  • Calling the IEditableDashboardStorage.AddDashboard and IDashboardStorage.SaveDashboard methods leads to an exception.

  • Information about data sources contained in a dashboard xml definition is not passed to the client when you request a dashboard XML file.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ClientTrustLevel property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

DashboardUserBasedAspNetCore/CS/Code/MultiTenantDashboardConfigurator.cs#L24

csharp
if (string.IsNullOrEmpty(userName) || userName == "Guest")
        e.ClientTrustLevel = ClientTrustLevel.Restricted;
}

dashboard-blazor-server-multi-tenancy/CS/BlazorAuth/Code/MultiTenantDashboardConfigurator.cs#L20

csharp
if (string.IsNullOrEmpty(userName) || userName == "guest")
        e.ClientTrustLevel = ClientTrustLevel.Restricted;
}

DashboardUserBasedMVC/CS/MVCDashboard/App_Start/DashboardConfig.cs#L23

csharp
if (userName == null || userName == "Guest")
        e.ClientTrustLevel = ClientTrustLevel.Restricted;
}

See Also

VerifyClientTrustLevelEventArgs Class

VerifyClientTrustLevelEventArgs Members

DevExpress.DashboardWeb Namespace