[MGNLDAM-701] Disable upload button in field upload when lacking write permission Created: 17/Mar/17  Updated: 12/Mar/21  Resolved: 12/Mar/21

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM App
Affects Version/s: 2.1.2, 2.1.5, 2.2.1
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: quickwin
Remaining Estimate: 3d
Time Spent: Not Specified
Original Estimate: 3d

Attachments: PNG File aclSetup.png     PNG File select-file-enable.png     PNG File upload-asset-enable.png    
Issue Links:
Relates
relates to MGNLDAM-626 Disable upload button in chooseDialog... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Story Points: 3

 Description   

Steps to reproduce:

  • Log in to "superuser"
  • Adjust "travel-demo-editor" role to have "Read-only" and "Subnodes" on DAM for the path "travel-demo" ( )
  • Log in to "eric"
  • Go DAM app, select "travel-demo"
  • Observe: "Upload asset" is enable and click it ( )
  • Observe: "Select a file to upload" is enable and select one file to upload ( )

=> Click "Save change" and AccessDeniedException is thrown

Expectation: "Upload asset" or "Select a file to upload" is disable



 Comments   
Comment by Mikaël Geljić [ 17/Mar/17 ]

Let's try not to spread permission checks everywhere

Since MGNLUI-4081, JcrNodeAdapter, produce read-only properties when node is frozen (e.g. JCR version).
We could consider checking for write permissions also there; then all the upload-field would have to do is to support read-only properties.

Comment by Roman Kovařík [ 12/Mar/21 ]

Upload action is disabled on latest https://git.magnolia-cms.com/projects/MODULES/repos/dam/browse/magnolia-dam-app-jcr/src/main/resources/dam-app-jcr/decorations/dam-assets-app/apps/dam.subApps.yaml#194

Generated at Mon Feb 12 05:02:24 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.