public NavigationItemBuilder HasPermissions(string menuType, params string[] permissionName) { var url = RouteHelper.GetUrl(_item.RouteValues); _item.HasPermissions = permissionName?.Select(p => Permission.Create(p, url, "Navigation", string.IsNullOrEmpty(url) ? null : menuType + "/" + url + "/" + p, new LocalizableString(_item.DisplayName.SourceName, p))).ToArray(); return(this); }
private MenuItemDefinition funTransfter(INavigationItemDefinition menuItem) { var localizableString = (LocalizableString)(menuItem.DisplayName); var menuDefinition = new MenuItemDefinition( menuItem.Name, new Abp.Localization.LocalizableString(localizableString.Name, localizableString.SourceName), null, RouteHelper.GetUrl(menuItem.RouteValues)); // menuItem.Items?.ForEach(navigationItemDefinition => // { // menuDefinition.AddItem(funTransfter(navigationItemDefinition)); // }); return(menuDefinition); }