Completed
Last Updated: 30 Jul 2024 14:05 by ADMIN
Release 2024 Q3 (Aug)
Jodeen
Created on: 04 Jul 2023 07:31
Category: Menu
Type: Bug Report
2
When SecutiryTrimming is enabled adding the [Authorize] attribute with a comma-delimited list of roles does not show the Menu items

### Bug report

Adding the [Authorize(Roles = "Admin, User")] attribute at Controller or Actions within the Controller does not show the Menu items.

### Reproduction of the problem

1. Create an application with authorization and add "Admin" and "User" roles.

2. Add the [Authorize(Roles = "Admin, User")] attribute to a specified Action method within the Controller:

public class HomeController : Controller
{
        public IActionResult Index()
        {
            return View();
        }

        [Authorize(Roles = "Admin, User")]
        public IActionResult Security_Information()
        {
            return View();
        }
}

3. Add a Menu:

    @(Html.Kendo().Menu()
        .Name("htmlhelperMenu")
        .SecurityTrimming(true)
        .Items(menu =>
        {
            menu.Add().Text("Home").Action("Index", "Home");
            menu.Add().Text("Security Information").Action("Security_Information", "Home");
        })
    )

    <kendo-menu name="taghelperMenu">
        <items>
            <menu-item text="View Inventory">
                <sub-items>
                    <menu-item text="Home" asp-controller="Home" asp-action="Index"></menu-item>
                    <menu-item text="Security Information" asp-controller="Home" asp-action="Security_Information"></menu-item>
                </sub-items>
            </menu-item>
        </items>
    </kendo-menu>

3. The "Security Information" Menu item is not visible when the user is logged as "Admin" or as "User".

### Expected/desired behavior

The "Security Information" Menu item should be visible when the [Authorize(Roles = "Admin, User")] attribute is added to the respective Action/Controller and the user is logged as "Admin" or as "User".


### Environment

* **Telerik UI for ASP.NET Core version: 2023.2.606
* **Browser: [all]

2 comments
ADMIN
Mihaela
Posted on: 27 Jul 2023 12:58

Hello Jodeen,

At this stage, I'm afraid I cannot give an exact estimate on when the solution would be implemented, but I have increased the priority in the GitHub item in the kendo-ui-core repository:

https://github.com/telerik/kendo-ui-core/issues/7418

When a fix has been introduced, the GitHub item will be updated accordingly. Apologies for any inconvenience that this might have caused you. 

Regards, Mihaela Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Jodeen
Posted on: 20 Jul 2023 17:35
Any ideas on when this bug will be resolved?