title: Flask Principal granular resource on demand
body: <p>I've been looking at this post:
  <a href="http://pythonhosted.org/Flask-Principal/#granular-resource-protection" rel="noreferrer">http://pythonhosted.org/Flask-Principal/#granular-resource-protection</a></p>
  
  <p>Now while there is nothing wrong with how it is currently working I can't see that it is very usable since at the time of login all posts are read and the <code>EditBlogPostNeed</code> is added  to the identity.</p>
  
  <p>Imagine if I have been writing more than the normal number of posts it will long term not be a very good strategy as I would like to check the post as I access the view <code>/posts/&lt;post_id&gt;</code>.</p>
  
  <p>Is there a way to do this check on each request for the view using <code>Flask Principal</code>?</p>
  
  <p>I can of course get around it very easily with a lazy relationship query and filter but I want to use <code>Flask Principal</code>.</p>