var Principal = require('../lib/principals').Principal; var elasticQuery = require('../lib/permissionsQueries/elastic'); var arangodbQuery = require('../lib/permissionsQueries/arangodb'); var mongodbQuery = require('../lib/permissionsQueries/mongodb'); var IWorkflowLookup = require('protoncms-core').interfaces.IWorkflowLookup; var IPublishWorkflow = createInterface({ // Interface for PublishWorkflow name: 'IPublishWorkflow', schema: { statePropName: 'publishWorkflow', defaultState: 'draft', states: { draft: {title: 'Utkast'}, published: {title: 'Publicerad'}, trash: {title: 'Papperskorg'} } } }); var PublishWorkflowLookup = createUtility({ implements: IWorkflowLookup, name: 'PublishWorkflow', getInterface: function () {return IPublishWorkflow} }); registry.registerUtility(PublishWorkflowLookup);
'use strict'; var createInterface = require('component-registry').createInterface; module.exports.IFieldDummyData = createInterface({ name: 'IFieldDummyData' });
'use strict'; var createInterface = require('component-registry').createInterface; /* Network ities */ module.exports.IDataFetcher = createInterface({ // Utility to fetch data from API for page rendering name: 'IDataFetcher' }); module.exports.IApiCall = createInterface({ // Utility providing other calls to the API name: 'IApiCall' }); module.exports.IDeserialize = createInterface({ // Utility to convert JSON data to a proper data structure // with proper ProtonCMS objects where applicable name: 'IDeserialize' });
'use strict'; var createInterface = require('component-registry').createInterface; module.exports.IWorkflow = createInterface({ /* A workflow collection object prototype where workflow objects are stored. The idea is to extend this object prototype when creating specific workflows. Content objects that want to use a workflow can extend one or more of the specific workflow object prototypes, but other workflows can also be implemented and added ad hoc in an app. */ name: 'IWorkflow', members: { _workflows: "object -- collection of workflows" } }); module.exports.IWorkflowLookup = createInterface({ /* This allows us to look up registered workflows */ name: 'IWorkflowLookup', members: { interface: "", } }); module.exports.IWorkflowState = createInterface({ /* An adapter to interact with a workflow. This allows permission checks etc to be performed.
'use strict'; var createInterface = require('component-registry').createInterface; module.exports.IRichTextWidget = createInterface({ name: 'IRichTextWidget' }); module.exports.IRichTextAction = createInterface({ name: 'IRichTextAction' });