Description
As part of the secure file retrieval system, we need to implement entity-specific access rules for files attached to the News module. Implement a NewsAccessValidator that implements the base FileAccessValidator interface to enforce who can view or download news-related files (e.g., article images).
Requirements
- Create the NewsAccessValidator class that implements the FileAccessValidator interface;
- Implement the hasAccess(...) logic specific to the News module;
- Register the validator in the FileAccessValidatorResolver (or Spring context) so it is automatically applied to files with RelatedEntityType.NEWS;
Description
As part of the secure file retrieval system, we need to implement entity-specific access rules for files attached to the News module. Implement a NewsAccessValidator that implements the base FileAccessValidator interface to enforce who can view or download news-related files (e.g., article images).
Requirements