title: Sharing Objects with other users in Django
body: <p>I'm modeling a quite complex system in Django. I will post here only the relevant part of it and I will show simplified use cases diagrams to better express my ideas.</p>
  
  <p>I basically have 2 type of users: Seller and Customer. </p>
  
  <ol>
  <li><p>A <em>Seller</em> "<strong>acquires</strong>" a <em>Customer</em>, that means that the seller now has
  the customer's personal information and can interact with him/her.<br>
  A seller <strong>cannot</strong> interact with a customer that he didn't acquire. 
  <img src="https://i.stack.imgur.com/Zums1.png" alt="enter image description here"></p></li>
  <li><p>A <em>Seller</em> creates a model <strong>hierarchy</strong> of related objects (each model in a sublevel is connected with a Foreign key to its parent)<br>
  <img src="https://i.stack.imgur.com/Urrwp.png" alt="enter image description here"></p></li>
  <li><p>A <em>Seller</em> <strong>shares</strong> the created <strong>box</strong> object and all its related objects with some <strong>customers</strong>
  <img src="https://i.stack.imgur.com/Rfa27.png" alt="enter image description here"></p></li>
  <li><p>The Authorized <strong>Customers</strong> can:</p>
  
  <ul>
  <li><strong>R</strong>-ead some attributes of the <strong>Box</strong> model</li>
  <li><strong>R</strong>-ead and <strong>U</strong>-pdate some attributes of the <strong>Item</strong> model</li>
  <li><strong>Can't</strong> access some attributes of the <strong>Item</strong> model</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/Zx0hy.png" alt="enter image description here"></p></li>
  </ol>
  
  <p><strong>Questions:</strong></p>
  
  <ul>
  <li><strong>A</strong>: What is the best approach to create <strong>relationship</strong> between users?<br>
  I've seen that <a href="https://github.com/coleifer/django-relationships" rel="noreferrer">django-relationship</a> could be useful.</li>
  <li><strong>B</strong>: What is the best approach to <strong>share</strong> Model instances in Django
  with other users?<br>
  In my case, by default a <em>Customer</em> <strong>can't</strong> access any model created by the <em>Seller</em> if not explicitly shared.    </li>
  <li><strong>C</strong>: If I share only the <strong>Box</strong> model, does it implicitly mean that also all its related model (Foreign keys to Box model) will be shared?</li>
  <li><strong>D</strong>: What is the best approach to control <strong>field</strong> level <strong>permission</strong>
  per user?<br>
  Can <a href="https://github.com/lukaszb/django-guardian" rel="noreferrer">django-guardian</a> be useful here?</li>
  </ul>