Skip to content
Loading
asp.net core razor use of role in view  
  •     }  
  • Safe now? 
    +1
  • Marius Vasile
    Thank you Sachin, so I can use some "fake "Models then to achieve the same result, or use a Count. Because I don't know how to achieve that from cshtml.cs but only to give access or not to the whole page. portions of the page....I don't know how
    +1
  • Sachin Singh
    obviously unsafe ,you are exposing roles to outside world, anybody can inspect and know.
    sure do it in cshtml.cs.
    +1