Adding the [Authorize]
attribute to a controller does not hide the action methods when SecurityTrimming is enabled.
[Authorize]
attribute to a controller: [Authorize]
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
public IActionResult About()
{
return View();
}
@(Html.Kendo().Menu()
.Name("menu")
.SecurityTrimming(st=>{
st.Enabled(true);
})
.Items(i=>{
i.Add().Action("Index", "Home").Text("Index");
i.Add().Action("About", "Home").Text("About");
})
)
The Index and About menu items will not be hidden.
The Index and About menu items should be hidden when the [Authorize]
attribute is added to the controller.
Security trimming returns incorrect items when there are two controllers with the same name but located in different areas.
With the following Menu configuration
@(Html.Kendo().Menu()
.Name("menu")
.SecurityTrimming(st=>{
st.Enabled(true);
})
.Items(i=>{
i.Add().Action("MyAction","Home",new {area = "Area1"}).Text("Accessible Item");
i.Add().Action("MyAction","Home",new {area = "Area2"}).Text("Authorized Item");
})
)
and the following area/controller/action structure the MyAction Action in Area2 will not be trimmed.
Areas
|--Area1
| |--Controllers
| |--HomeController
| |--MyAction
|--Area2
|--Controllers
|--HomeController
|--[Authorize]MyAction
MyAction Action in Area2 should be trimmed.
Security Trimming does not work with custom authorization attributes
When custom authorization attribute is used it is not evaluated and the menu item not hidden, if authorization has failed.
Security Trimming does not work with custom authorization attributes.
### Bug report
The Menu flickers on page load (i.e., when reloading the page, when navigating through the application pages).
### Reproduction of the problem
Attached is a demo that replicates the issue.
### Expected/desired behavior
The Menu should be rendered smoothly.
### Environment
* **Kendo UI version: 2022.1.412
* **jQuery version: 3.5.1
* **Browser: [all]
A Menu submenu sometimes detaches from its parent when the root element is hovered.
This issue is difficult to reproduce. Multiple tries are needed.
The subitem should not detach from its parent
Hello,
On Chrome for Android, the dropdown menu appears offscreen. With Firefox for Android or Chrome desktop, it works well.
This sample reproduces the problem : https://runner.telerik.io/fullscreen/@kakone/azuPAHuy. If you click on the right item (user icon), the dropdown appears offscreen.
Reproducible in Chrome and Firefox. Not reproducible in IE11.
Dojo example.
There are two Menus. In the first one navigation is triggered from the function passed to the "Sub Item 2" item's url option. In the second Menu navigation is triggered in the Menu's select event handler.
Doing this in the first Menu, results in the submenu remaining open.
The submenu should close in both scenarios, since closeOnClick is enabled by default and the select event fires before triggering the navigation.