This is a migrated thread and some comments may be shown as answers.

Menu does not work with areas

2 Answers 136 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jan Olsmar
Top achievements
Rank 1
Jan Olsmar asked on 02 Apr 2013, 10:18 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 04 Apr 2013, 11:42 AM
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!
0
Jan Olsmar
Top achievements
Rank 1
answered on 04 Apr 2013, 01:04 PM
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.
Tags
Menu
Asked by
Jan Olsmar
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jan Olsmar
Top achievements
Rank 1
Share this question
or