Menu does not work with areas

3 posts, 1 answers
  1. Jan Olsmar
    Jan Olsmar avatar
    35 posts
    Member since:
    Mar 2006

    Posted 02 Apr 2013 Link to this post

    If you have a menu and add a item like the line below. All menu items after the line show up even if the authorize say they should not. The menu work as expected if the line is  the last line. (1q 2013)
    items.Add()
           .Text("Användare").Action("Index", "Dashboard", new { area = "SecurityGuard" });
  2. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 04 Apr 2013 Link to this post

    Hello Jan Olsmar,

    I tried to reproduce this behavior but the security trimming seems to work as expected. Could you check the attached project and let me know if I am missing something?

    Regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jan Olsmar
    Jan Olsmar avatar
    35 posts
    Member since:
    Mar 2006

    Posted 04 Apr 2013 Link to this post

    OK, I know realize that I should have told  that when I click the area menu item I leave the main page layout.
    If I put in the code new { area = ""} the menus works fine.
    This I have to do normally but in my case I didn't have to.
    So my case are maybe a little odd. So the solution is to add new area="" even if you don't need it "normally".
    By the way you just have to add the area ="" on the item just after the area "xxxx" item.
    Or have that item last I the menu :) 
    Thanks and sorry that I misled you.
Back to Top