The Kendo UI Menu widget has a built-in security trimming functionality, which is enabled by default.
If the URL, which the Menu item points to, is not authorized, then it is hidden. Security trimming depends on the ASP.NET MVC Authorization. Every
action method decorated with
AuthorizeAttribute checks whether the user is authorized and allows or forbids the request.
For more information on the ASP.NET MVC Authorization, refer to this link.
To use a custom
AuthorizeAttribute, refer to this link.
When the Menu items are removed because of lacking permissions, a parent item may be left without any children. For such cases, the Menu provides an option to remove the "orphaned" parent items:
@(Html.Kendo().Menu() .Name("MainMenu") .SecurityTrimming(s => s.HideParent(true)) )