core icon indicating copy to clipboard operation
core copied to clipboard

FileAsset lost after trying to save without permissions

Open dsilvam opened this issue 9 years ago • 2 comments

If you try to save a FileAsset to a Site/Folder you don't have permissions to, you get the expected message, but then when you select a Site/Folder you do have permissions to save to, you get a message saying that the File Asset is required, meaning that it loses the already attached file.

Steps to reproduce:

  1. Edit Content Type 'File Asset' and give publish permissions to 'Contributor' Role
  2. Log in as 'Joe Contributor', go to Content Search and hit 'Add New Content' for type 'File Asset'
  3. Make sure selected Host or Folder is "demo.dotcms.com" and attach a file and click "Save / Publish". You will get a invalid permissions message.
  4. Choose the "resource" folder in the Host or Folder field and hit "Save / Publish" again. You will get a message saying "The field File Asset is mandatory."

https://www.screencast.com/t/n4UkHizZfg

dsilvam avatar Oct 05 '17 19:10 dsilvam

PR: https://github.com/dotCMS/core/pull/12893

acurionedotcms avatar Oct 18 '17 21:10 acurionedotcms

Passed QA, tested with contributor role on document and file asset content type, and tested with a role that inherits the contributor permissions... filer persists on the content even after fail due to host or folder attempt where permissions do not match.

DeanGonzalez avatar Oct 24 '17 15:10 DeanGonzalez