Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When SecutiryTrimming is enabled adding the [Authorize] attribute to a controller does not hide it's action methods #7248

Closed
aleksandarevangelatov opened this issue Mar 9, 2023 · 0 comments
Assignees

Comments

@aleksandarevangelatov
Copy link
Contributor

Bug report

Adding the [Authorize] attribute to a controller does not hide the action methods when SecurityTrimming is enabled.

Reproduction of the problem

  1. Create an application with authorization and add an [Authorize] attribute to a controller:
    [Authorize]
    public class HomeController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }

        public IActionResult About()
        {
            return View();
        }
  1. Add a Menu
        @(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");
          })
          )

Current behavior

The Index and About menu items will not be hidden.

Expected/desired behavior

The Index and About menu items should be hidden when the [Authorize] attribute is added to the controller.

Environment

  • Kendo UI version: 2023.1.117
  • Browser: [all]
@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Mar 9, 2023
@gyankov gyankov self-assigned this Nov 1, 2023
@gyankov gyankov closed this as completed Nov 6, 2023
@github-actions github-actions bot added FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants