Monday, 11 December 2017

MVC Field Level Security

You can use razor syntax to check if the user is in a particular role.
@if(User.IsInRole("Administrator")) {
    Html.TextBoxFor(...);
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.