I use Umbraco and I need to hidden tags for some user roles. How can I know user role in view?
The User class has a built in function IsInRole(string roleName). In your view, you would put something like this:
@if (User.IsInRole("myRole")){
@html.editorfor....
}else{
@html.hiddenfor...
}