web / lib/collections/datasets/hooks
lib/collections/datasets/hooks
Hooks for the Datasets collection.
Validates business rules such as:
- Datasets in public catalogs must be public
- Force public if allowPrivateImports is disabled
- Sync isPublic to events for denormalized access control
Variables
validatePublicCatalogDataset
constvalidatePublicCatalogDataset:CollectionBeforeChangeHook
Validates that datasets in public catalogs are also public. Also forces datasets to be public if allowPrivateImports is disabled. Sets createdBy and catalogCreatorId on creation/update.
syncIsPublicToEvents
constsyncIsPublicToEvents:CollectionAfterChangeHook<Dataset>
Sync isPublic changes to all events in this dataset. Updates the denormalized datasetIsPublic field for access control.
Last updated on