Hi Radzen,
I'm struggling on setting the component "visible"" and "disabled" properties using the Security.IsInRole object.
What is the proper way to do this in the Designer.
I have used the forum to search and have tried the suggestions, it sometimes works for one component and not for an other.
Getting : too many characters (cs1012) and all sorts of errors.
In Navigation items this with one or two options works: but not with 3 options
reproduce:
Create a menu (with no path , to make a sub menu heading)
Create a menu item under the first one .
And put the Security.IsInRole with three Rols in it and you will get an error , with two roles it wil not complain.
Rolenames must be of some length , "ADMIN","Tenantsadmin","Helpdesk" e.g.
The singe quotes I have used with the ${} notation without the @ sign, just to be sure ..
The error is not given right away, I have stopt and run the application again ..
dotnet: D:\Radzen\Blazor\xx\xxx\RadzenAPP\server\Shared\MainLayout.razor(137,75): error RZ9986: Component attributes do not support complex content (mixed C# and markup). Attribute: 'Visible', text: 'Security.IsInRole(new string[]{"MCM","tenantsadmin","Helpdesk"}) ' [D:\Radzen\Blazor\xx\xxx\RadzenAPP\server\RadzenAPP.csproj]
PS: I notice that there is a " " blank- space char at the end of the line with code like:
'Security.IsInRole(new string[]{"MCM","tenantsadmin","Helpdesk"}) '