views:

222

answers:

1

How's authorization supported in Telerik's MVC extensions ?

I am particularly interested in two cases:

  1. tabs
  2. grid row editing/deleting/inserting
+1  A: 

ASP.NET MVC authorization is supported at controller level through the AuthorizeAttribute.

The tabstrip should perform security trimming and not show tabs which navigate to action methods which the current user does not have access to.

The grid won't hide the editing/deleting/inserting commands. If unauthorized user tries to perform the operation he would end up with a blank screen (if using server binding) or raise the OnError client side event (for ajax binding scenarios). The error code would be 401 - unauthorized.

korchev
I added authorization to one grid row edit action, and when I press the edit button, Firebug shows that the app has tried to redirect to the login form. I guess I can override that somehow
I have not tested this to be honest. If you are using Ajax binding the OnError event should be raised I guess and you can act accordingly - redirect to the login page using JavaScript.
korchev