UNPKG

scrivito

Version:

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

16 lines (12 loc) 350 B
import { ScopeTransformation } from 'scrivito_sdk/models/obj_scope'; export const restrictToGlobal: ScopeTransformation = { isInScope(obj) { return obj.siteId() === null; }, applyToSearch(search) { return search.and('_siteId', 'equals', null); }, applyToCreate(attributes) { return { ...attributes, _site_id: null }; }, };