title: Database independent row level security solution
body: <p>does anybody knows about Java/C# database independent authorization library. This library should support read, write, delete, insert actions across company organizational structure.  </p>
  
  <p>Something like this:<br>
      - user can see all documents<br>
      - user can enter new document assigned to his unit<br>
      - user can change all documents assigned to his unit and all subordinate units.<br>
      - user can delete documents that are assigned to him   </p>
  
  <p>I should also be able to create custom actions (besides read, write,...) connect them to certain class and assign that "security token" to user (e.g. document.expire). 
  If there aren't any either free or commercial libraries, is there a book that could be useful in implementing this functionality?</p>
  
  <p>Thanks.</p>