Asset Selector Microfrontend - Rule-based hiding of Assets
Use-case:
AEM is used to manage and host the website. Assets are delivered from Publish.
A 3rd party, external, customer-facing application uses AEM as delivery system for their assets.
The according backoffice application uses the MFE to select assets.
Users of the 3rd party application must not see or select assets that are in a certain state (e.g. have not been published or approved or are expired or ...).
Otherwise the app would store references that have not been approved (in this case "published") and cannot be served from Publish.
IMPORTANT NOTE:
"Hiding assets" is not the same as filtering for assets (which can be configured):
"Filtering" always triggers a search, i.e. it would display all assets of the current and _all subfolders_. Also, this is a user action.
"Hiding" in turn would a) not be a user action, but configured by the administrators. And b) would be applied automatically when users browse through the folder structure (I believe a majority still uses folders and browsers over search/metadata). This hiding of course also needs to be applied to the results when a user does an explicit search.
Current/Experienced Behavior:
All assets are displayed - regardless of their state
Improved/Expected Behavior:
Administrators can define a set of rules that prevent certain assets to be displayed.
OR
The MFE calls a callback on each asset tile / row it wants to render and a customizer can provide code to return a value to enable/disable/hide the asset's tile.
Environment Details (AEM version/service pack, any other specifics if applicable):