Setting Visible Disabled with Security Roles

That's what I tested with ...


<RadzenPanelMenuItem Text="Item 0" Visible="@Security.IsInRole(new string[] { "One", "Two", "Three", "Four", "Five"})">
</RadzenPanelMenuItem>

In addition the IsInRole method is declared as params

public bool IsInRole(params string[] roles)

This means you can use it like this:

Security.IsInRole("One", "Two", "Three", "Four", "Five")

Trailing whitespace after the ) may indeed be a problem - delete it if there is any.

1 Like