[IMGREC-102] DAM decoration gives editing action to read-only users Created: 09/Mar/21  Updated: 26/Aug/22

Status: Open
Project: Image Recognition
Component/s: None
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Chris Jennings Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-6404 Check correctness of settings of writ... Closed
Template:
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
Epic Link: AuthorX Maintenance
Team: AuthorX

 Description   

Steps to reproduce

  1. Open the DAM app (decorated with the content-tags-integration decorator) using a user without write access to the DAM.
  2. See the browser sub app contains an active action, Modify Tags.
    # Click Modify Tags to open a usable dialog.

Note:
Decorator: https://git.magnolia-cms.com/projects/ENTERPRISE/repos/image-recognition/browse/content-tags-integration/src/main/resources/content-tags-integration/decorations/dam-assets-app/apps/dam.subApps.yaml
To create a read-only user in the travel demo, modify the role travel-demo-tour-editor and use eric/eric.

Expected results

If the user cannot edit the underlying asset, the image action should not be enabled. This follows the pattern of the rest of the DAM app / Magnolia UI.

Actual results

  1. The dialog can be opened and the tags modified.
  2. An error is thrown on attempting to save modified tags.

Workaround

# Decorate the decoration.
ie. /decorations/dam-assets-app/apps/dam.yaml

subApps: 
  jcrBrowser: 
    actions: 
      modifyTags: 
        availability: 
          writePermissionRequired: true

Development notes


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