title: ASP.NET MVC Authorisation with CRUD roles
body: <p>I need the ability to restrict what users can do in my application based on dynamic roles for <strong>CRUD</strong>.</p>
  
  <p>For example the User/Index would need an authentication such as <code>[ClaimsAuthorize("View", "User")]</code> as oposed to <code>[Authorise(Roles="Administrator")]</code> so that I can check if the user has the security to view.</p>
  
  <p>I have the user roles configured, but what the roles enable users to do is dynamic. An administrator can change the security levels with check boxes that will enable different security groups to do different things.</p>
  
  <p>The main problem is doing this in <strong>Razor</strong>, I need something similar to <code>@User.CanEditUsers</code>, but I am not sure how I can go about doing this at all.</p>
  
  <p>Any help would be greatly appreciated as I am having trouble finding the correct way to go about this.</p>