title: role based access to methods
body: <p>I'm implementing system which uses role based access to different methods in classes. For example to perform any action I need to check whether user which uses it can do it.</p>
  
  <p>I can write in each method:</p>
  
  <pre><code>if(User.IsInRole ...) {
  } else {
  return ... throw ... whatever
  }
  </code></pre>
  
  <p>I was thinking about automating this process for example by adding attributes to this methods or maybe any other solution?</p>