title: How to implement ACL in Postgresql
body: <p>There are two models in my database: Business and Brand. Each business has one or more access to several brands, such as reading, updating and deleting. </p>
  
  <p>I am not sure what is the best way to implement the access control. For now, I created a joining table with several fields: <code>business_id</code>, <code>brand_id</code>, <code>can_read</code>, <code>can_update</code>, <code>can_delete</code>, and whenever some action will be taken, I check this table.</p>
  
  <p>However, I realised that such approach is in the application level, not in the database level.</p>
  
  <p>My question is, is there any approach to implement such access control in the database level?</p>
  
  <p>I have Googled "ACL in Postgresql", but the results are all about the accounts of the database itself, not the data it stores.</p>
  
  <p>Please help!</p>