What's new in EzyPlatform 1.3.9?
This release introduces payment-required media support, extends media access control on the Web, improves APIs and performance, and provides new extension points for payment validation plugins.
-
Added payment-required media supportEzyPlatform now supports marking media as
paymentRequired, with the status stored using thepayment_requiredmetadata key. This enables the platform to identify media that can only be accessed after a successful payment. -
Extended media APIs and modelsThe
MediaDetailsModel,AdminMediaDetailsResponse, andMediaDetailsResponsemodels now include thepaymentRequiredfield, allowing both the Admin API and Web API to indicate whether a media item requires payment. -
Support for updating payment-required statusBoth
UpdateMediaRequestandUpdateMediaIncludeUrlRequesthave been extended with two new fields:updatePaymentRequiredandpaymentRequired. These fields allow clients to update the payment-required status when editing media. -
Extended MediaService APIs
MediaServicenow providessaveMediaPaymentRequired(...)andisPaymentRequiredByMediaId(...)for storing and retrieving the payment-required status of media items. -
Improved Admin media managementThe Admin Media Details dialog now includes a Payment Required checkbox, allowing administrators to enable or disable payment protection directly while editing media.
-
Added a new Website settingWebsite Settings now include the Allow users to update media payment requirement option. When disabled, the Web API automatically ignores any attempt by users to update the
paymentRequiredstatus. -
Enhanced media access controlWhen users download media through the Website, the platform now checks whether the media requires payment. If payment is required and the user is not authenticated, an authentication error is returned. If the user is authenticated, the platform publishes the
validate_user_payment_requiredevent, allowing external plugins or applications to implement their own payment validation logic before granting access. -
Extended MediaDownloadEvent
MediaDownloadEventnow includesRequestArguments, giving event handlers additional request context when validating media access. A correspondingWebValidateUserPaymentRequiredEventSchemaFetcherhas also been added to describe the schema of thevalidate_user_payment_requiredevent. -
Added SaveMetaRequestIntroduced the new
SaveMetaRequesttogether with its converter toSaveMetaModel, providing a more consistent and extensible way to save metadata. -
Improved login redirection
WebGlobalExceptionHandlernow usesWebViews.redirectToLogin(...)for login redirection, ensuring a consistent authentication flow throughout the platform. -
Optimized Media Details performance
AdminMediaModelDecorator.decorate(...)has been optimized by loading the owner admin, owner user, and media duration in parallel, reducing response time when displaying media details. -
Updated multilingual resourcesAdded translations for the new labels
allow_user_update_media_payment_requiredandpayment_requiredin Vietnamese, Japanese, Korean, and Chinese. -
Compatibility and test improvementsUpdated
com.mysql.cj.jdbc.Driver.acceptsURL(...)by removing thethrows SQLExceptiondeclaration. In addition,MediaControllerServiceTesthas been updated to verify that thepaymentRequiredstatus is correctly returned when retrieving media details.