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.
18 lines (14 loc) • 404 B
text/typescript
import { InternalError } from 'scrivito_sdk/common';
import { ScopeTransformation } from 'scrivito_sdk/models/obj_scope';
export const excludeGlobal: ScopeTransformation = {
isInScope(obj) {
return obj.siteId() !== null;
},
applyToSearch(search) {
return search.andNot('_siteId', 'equals', null);
},
applyToCreate() {
// Unsupported create
throw new InternalError();
},
};