Is there a preferred approach for Roles aware links in MVC 2

Posted by Ralph Shillington on Stack Overflow See other posts from Stack Overflow or by Ralph Shillington
Published on 2010-06-14T14:01:25Z Indexed on 2010/06/14 14:02 UTC
Read the original article Hit count: 177

Filed under:

If an action has been decorated with [Authorize(Roles="Administrators")] is there a way to not display the link for the currently logged in user who is not in the declared role?

It seems to me that baking a lot of if statements into the view to give this kind of "selective disclosure" is contrary to the MVC way, but I'm not sure what the alternative is?

© Stack Overflow or respective owner

Related posts about asp.net-mvc