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

Menu - Custom Authorize Attribute

1 Answer 102 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jigar
Top achievements
Rank 1
Jigar asked on 08 Sep 2010, 08:55 AM
Hi,

I am using menu, and binding it to the site map.

SiteMap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
  <siteMapNode title="Masters">
    <siteMapNode controller="Country" action="Index" title="Country" />
    <siteMapNode controller="Test" action="Index" title="Test" />
  </siteMapNode>
</siteMap>

My Country action Index is decorated with custom authorize attribute. and Test Action is not decorated with Custom Authorize attribute. So it's obvious that If logged in user don't have permission on Country's Index action menu won't show that. But In my case user has access to Country but still menu hides it. If I access the country's index action from browser it is accessible. So I guess my Custom Authorize attribute works as expected.

I do understand that Telerik menu while rendering check for the Custom Authorize attribute and generate the same class dynamically and evaluate that whether the action is accessible or not and accordingly it displays the menu items. (http://weblogs.asp.net/rashid/archive/2009/09/06/asp-net-mvc-and-authorization-and-monkey-patching.aspx)

Here I want to know what's going wrong in my case. Can you please suggest how can i debug telerik menu's custom authorization attribute execution.? Or What possible reasons for this behavior?

Thanks.

Jigar

1 Answer, 1 is accepted

Sort by
0
Jigar
Top achievements
Rank 1
answered on 24 Sep 2010, 11:02 AM
Hi,

Any help on this please?

Thanks.
Tags
Menu
Asked by
Jigar
Top achievements
Rank 1
Answers by
Jigar
Top achievements
Rank 1
Share this question
or