Body: <p>I would like to get a file of custom user field, which is "asset", and provide a link to the file for the user.</p>
  
  <p>However, the asset file cannot be gotten.
  The length of the asset field is zero.
  In addition, this issue happens only the <code>currentUser</code> is not admin.
  With admin account, the asset is gotten without any trouble.</p>
  
  <p>Of course, the user has a permission to view the asset volume.</p>
  
  <p>The asset volume has public URLs.
  On the other hand, the asset folder is out of web folder, but I do not realy think it is the cause because the asset file can be gotten with admin account.</p>
  
  <p>And, my Craft is ver 3.1.33.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T07:33:42.987Z
Comments.Text: [Edit]: Try clearing the entire craft3 cms cache prior to the below advised testing to be sure that it's no simple caching issue of some sort.
  [Original]:
  Are there any differences between the assets link if accessed by admin compared to non-admin? And can you also try out opening said links while not logged in at all?
  This might be helpful towards figuring out wherein the issue lies. Thanks.
Comments.UserDisplayName: Campiotti
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T14:33:22.533Z
Comments.Text: Thank you for your comment. 1) I cleared Craft cache, but the result is same. 2) With admin account, the link to the document is provided correctly. But with non-admin account, the link is not displayed because the asset field is empty. 3) Even with the non-admin account, it is possible to open the file with putting its URL directly. However, without login, the file is protected and the access is denied.
Comments.UserDisplayName: Kota.M
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-04T15:36:32.207Z
Comments.Text: Can you turn on `devmode` and clear all your logs under `storage/runtime/logs/*` and then try and access/get the image to appear for a `non-admin user` and after that upload the logs in a zip to some file-host? It'll be easier to see if there's some error going on. (If you don't want to upload logs, simply replying with a list of the log files generated would already help out quite a bit)
Comments.UserDisplayName: Campiotti
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-05T15:25:48.547Z
Comments.Text: Can you share the code you have currently?
Comments.UserDisplayName: dmatthams
Tags: <craft3><custom-field>
Title: Cannot get asset from custom user field, with no-admin account
ThreadText: # Cannot get asset from custom user field, with no-admin account
  
  (Asked by: username_0 on 2019-12-03)
  
  I would like to get a file of custom user field, which is "asset", and provide a link to the file for the user.
  
  However, the asset file cannot be gotten.
  The length of the asset field is zero.
  In addition, this issue happens only the `currentUser` is not admin.
  With admin account, the asset is gotten without any trouble.
  
  Of course, the user has a permission to view the asset volume.
  
  The asset volume has public URLs.
  On the other hand, the asset folder is out of web folder, but I do not realy think it is the cause because the asset file can be gotten with admin account.
  
  And, my Craft is ver 3.1.33.
  
  **Tags:** craft3, custom-field
  
  > **Comments:**
  > **username_1**: [Edit]: Try clearing the entire craft3 cms cache prior to the below advised testing to be sure that it's no simple caching issue of some sort. [Original]: Are there any differences between the assets link if accessed by admin compared to non-admin? And can you also try out opening said links while not logged in at all? This might be helpful towards figuring out wherein the issue lies. Thanks.  
  > **username_0**: Thank you for your comment. 1) I cleared Craft cache, but the result is same. 2) With admin account, the link to the document is provided correctly. But with non-admin account, the link is not displayed because the asset field is empty. 3) Even with the non-admin account, it is possible to open the file with putting its URL directly. However, without login, the file is protected and the access is denied.  
  > **username_1**: Can you turn on `devmode` and clear all your logs under `storage/runtime/logs/*` and then try and access/get the image to appear for a `non-admin user` and after that upload the logs in a zip to some file-host? It'll be easier to see if there's some error going on. (If you don't want to upload logs, simply replying with a list of the log files generated would already help out quite a bit)  
  > **username_2**: Can you share the code you have currently?  
  
  ---
  
  ## 0 answers
  
  