title: Zend_Auth or Zend_Acl in checking against DB record?
body: <p>In my application you have users and books. Users can create, edit and delete their own books. When a user logs in, he has to choose first which book he wants to work on. That book ID is stored in a session variable, so through the application it's clear which book the user is working on. Users can also share books with eachother, and the owner (who created the book) has more priviliges than other users who have been invited to contribute to the book.</p>
  
  <p>First I implemented it in quite a chaotic way and now I was thinking to do it like this:</p>
  
  <ul>
  <li>In the bootstrap, the controller plugin Auth is loaded.</li>
  <li>In the controller plugin I check if the user has an identity</li>
  <li>In the controller init() I load my action helper</li>
  <li>In the action helper I load Zend_Acl and check if the user has the priviliges to work on this specific book (check if a link between this user and this book exists) and also if he has the priviliges to perform these actions on the book (maybe he shouldn't be able to delete it).</li>
  </ul>
  
  <p>Does this make sense? And were should I store the book ID? In Zend_Auth::getInstance()->getStorage()?</p>
  
  <p><strong>Edit:</strong>
  And where do I store the role of the user? Also in the storage of Zend_Auth?</p>