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 (16 loc) • 529 B
text/typescript
import { isComparisonActive } from 'scrivito_sdk/app_support/editing_context';
import {
ObjScope,
currentObjSpaceId,
excludeDeletedObjs,
objSpaceScope,
} from 'scrivito_sdk/models';
/** returns an ObjScope that represents what is currently being displayed by
* the application, e.g. the current workspace.
*/
export function currentAppSpace(): ObjScope {
const currentObjSpace = objSpaceScope(currentObjSpaceId());
return isComparisonActive()
? currentObjSpace
: currentObjSpace.and(excludeDeletedObjs);
}