Answers.Body: <p>Welcome to the community Adam. </p>
  
  <p>Yes. Completely possible with vanilla Craft. </p>
  
  <p>There's always more than one way to achieve things but here's a first round. </p>
  
  <p>Start by creating two <strong>User Groups</strong>; Contractors and Clients. This will allow you to define permissions as needed. </p>
  
  <p>Your 'Property Projects' <strong>Section</strong> could contain fields like. </p>
  
  <ol>
  <li>Title</li>
  <li>Description</li>
  <li>Images</li>
  <li>Related Contractors (user)</li>
  <li>Related Client (user)</li>
  <li>Etc as needed</li>
  </ol>
  
  <p>Craft has a custom <strong>field type</strong> called '<strong>User</strong>' which will allow you to <strong>relate</strong> all of the relevant contractors to the project and also define who the client is, all within the 'project' Entry. </p>
  
  <p>Because the client also has a user profile and is able to log in to Craft (front end only), you can present their project information to them in the 'client area' of the site. </p>
  
  <p>If you actually want the client to edit their project Entry, then you could also consider making them the Author of their Entry. (Just an idea)</p>
  
  <p>Have a look at Craft's <a href="https://craftcms.com/docs/relations#the-relatedTo-param" rel="nofollow">relatedTo documentation</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-06T08:47:05.157Z
Answers.Text: You should also consider if there’s the need to not only restrict the listing of these private assets, but to also restict theactual access to the files via the URLs. If this is a requirement, have a look at the [Digital Download](https://craftpl.us/plugins/digital-download) plugin.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-06T16:02:46.513Z
Answers.Text: Nice one, Carl! - Added that one to my toolbox :)
Answers.UserDisplayName: Matt P
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-06T08:14:47.787Z
Answers.LastActivityDate: 2016-07-06T08:14:47.787Z
Answers.UserDisplayName: Matt P
Body: <p>Our client is a builder and they need a way for their contractors to login and upload/download documents about each build (plans, building consents, information etc). They (the builder) also need a way to share build information with their clients whose homes they're building (plans, progress, photos etc.).</p>
  
  <p>Ideally:</p>
  
  <ul>
  <li>contractors would be able to log in and we'd present them with a front-end page listing their projects, view the projects' files and maybe allow them to upload files? We want to be able to restrict the contractors only to builds that they're working on. If absolutely necessary it might be ok if the contractors needed to upload files through the CP rather than the front-end.</li>
  <li>clients would be able to log in to a front-end page and see their build(s) and any files that the contractors/builder had uploaded and made visible to them. they shouldn't be able to view other clients' builds' information.</li>
  </ul>
  
  <p>Is it possible to do this with vanilla Craft, or would we have to write a plugin to enable us to do this? </p>
  
  <p>How easy is it to associate a user/users/groups with entries/asset sources?</p>
  
Tags: <entries><users><control-panel><usermodel>
Title: Sharing files with logged-in users
ThreadText: # Sharing files with logged-in users
  
  (Asked by: username_0 on 2016-07-06)
  
  Our client is a builder and they need a way for their contractors to login and upload/download documents about each build (plans, building consents, information etc). They (the builder) also need a way to share build information with their clients whose homes they're building (plans, progress, photos etc.).
  
  Ideally:
  
  * contractors would be able to log in and we'd present them with a front-end page listing their projects, view the projects' files and maybe allow them to upload files? We want to be able to restrict the contractors only to builds that they're working on. If absolutely necessary it might be ok if the contractors needed to upload files through the CP rather than the front-end.
  * clients would be able to log in to a front-end page and see their build(s) and any files that the contractors/builder had uploaded and made visible to them. they shouldn't be able to view other clients' builds' information.
  
  Is it possible to do this with vanilla Craft, or would we have to write a plugin to enable us to do this?
  
  How easy is it to associate a user/users/groups with entries/asset sources?
  
  **Tags:** entries, users, control-panel, usermodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-06. Score: 3 | Accepted answer
  
  Welcome to the community username_0.
  
  Yes. Completely possible with vanilla Craft.
  
  There's always more than one way to achieve things but here's a first round.
  
  Start by creating two **User Groups**; Contractors and Clients. This will allow you to define permissions as needed.
  
  Your 'Property Projects' **Section** could contain fields like.
  
  1. Title
  2. Description
  3. Images
  4. Related Contractors (user)
  5. Related Client (user)
  6. Etc as needed
  
  Craft has a custom **field type** called '**User**' which will allow you to **relate** all of the relevant contractors to the project and also define who the client is, all within the 'project' Entry.
  
  Because the client also has a user profile and is able to log in to Craft (front end only), you can present their project information to them in the 'client area' of the site.
  
  If you actually want the client to edit their project Entry, then you could also consider making them the Author of their Entry. (Just an idea)
  
  Have a look at Craft's [relatedTo documentation](https://craftcms.com/docs/relations#the-relatedTo-param)
  
  > **Comments:**
  > **username_2**: You should also consider if there’s the need to not only restrict the listing of these private assets, but to also restict theactual access to the files via the URLs. If this is a requirement, have a look at the [Digital Download](https://craftpl.us/plugins/digital-download) plugin.  
  > **username_1**: Nice one, Carl! - Added that one to my toolbox :)  
  
  ---
  
  