Select theme:
Radzen Blazor Studio has replaced Radzen as the primary RAD tool for Blazor applications.
Radzen Blazor Studio offers a modern UI, enhanced features, and improved performance to streamline your development process.
The latest documentation for Radzen Blazor Studio is available here: https://www.radzen.com/blazor-studio/documentation/
Open Radzen Blazor Studio docsThe current application user is available as the User property of the SecurityService class. An instance of this class is available
in Blazor components which Radzen generates from the application pages.

Here is how to inject the SecurityService in custom classes.
SecurityServiceprivate readonly SecurityService security;
SecurityService.public MyService(SecurityService security)
{
}
public MyService(SecurityService security)
{
this.security = security;
}
If you are extending one of the services generated by Radzen make sure to invoke the generated constructor and add all existing parameters e.g.
public partial class CrmService
{
private readonly SecurityService security;
public CrmService(/* add the context parameter */CrmContext context, SecurityService security)
: /*invoke the generated constructor */this(context)
{
this.security = security;
}
}
After you have injected the SecurityService you can use its properties and methods:
var user = security.User;
var isAdmin = security.IsInRole("Administrator");
Radzen is free to use. You can also test the premium features for 15 days.
Start FreeSelect theme: