Text files stored incorrectly as binary (MGNLRES-346)

[MGNLRES-347] Fix Action availability for Edit and View actions for binary files Created: 11/Mar/20  Updated: 29/Mar/22  Resolved: 16/Mar/20

Status: Closed
Project: Magnolia Resources Module
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: Sub-task Priority: Neutral
Reporter: Rishab Dhar Assignee: Rishab Dhar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Sprint: UI Framework 18, UI Framework 19
Team: Nucleus

 Description   

The resources app currently has both edit and view actions available for both text and binary files. These actions should be enabled for only whitelisted text files, and disabled for the rest.



 Comments   
Comment by Rishab Dhar [ 16/Mar/20 ]

Action availability is fixed with following changes:

  • The info.magnolia.resources.app.availability.IsNotBinaryFileRule avaialbility rule is used instead of info.magnolia.resources.app.availability.IsFileRule for textMimeType detection.
  • Improvements in the info.magnolia.resources.app.availability.IsNotBinaryFileRule to use info.magnolia.resources.app.data.ResourceHelper for detecting text mime type
  • Adding a custom commit action info.magnolia.resources.app.action.ResourceCommitAction for saving any changes made to a text resource in edit mode.
Generated at Mon Feb 12 06:49:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.