We want to restrict some users to access metadata field of multimedia components, is this out of box possible using users and groups ?
AFAIK - OOTB No, you could write an event system to check the specific schema metadata fields change while OnComponentSave event to Prevent Unauthorised Users Updating.
There are no specific API to check specific field value changed or not?, but you could detect if there are any changes in metadata XML content using args.DetectedChanges.
if (!args.DetectedChanges.ContainsKey("Metadata")) return; var newMetadata = args.DetectedChanges["Metadata"].CurrentValue as XmlDocument; var previousMetadata = args.DetectedChanges["Metadata"].LoadedValue as XmlDocument;
I hope it helps
With regards to your comments on simply not allowing the change on the field, there used to be an extension to make fields read-only.
Also, there's an IDEA on this too: https://community.sdl.com/ideas/sdl-tridion-dx-ideas/i/sdl-tridion-sites-ideas/read-only-fields-per-group
Last I tried, you could try to remove read permissions on certain embedded Schema and the UI would render just the fields the user can access.
However, this has issues with mandatory fields and to me, it seems like more of a hack than a proper product feature.
There are probably a few ways to simplify or otherwise address the requirement. Specifically, it seems you want certain people to manage, edit, or otherwise review select (metadata) content related to a Multimedia Component.
Rather than a hard restriction, I would consider an update to:
- Editing process and instructions, so that the correct information is edited at the right time
- A change to the content model where the metadata information for its binary is separated, either in the linking Component or separate Components managed by a different group
- Review process, where the appropriate metadata is defined and/or reviewed outside of the CMS
A technical solution could be a good fit depending on the importance of these specific fields, though looking into the root problem and issues could be a more effective approach.