Ejemplo n.º 1
0
from guillotina import configure
from guillotina.i18n import MessageFactory

_ = MessageFactory("guillotina.contrib.dbusers")

app_settings = {
    "auth_user_identifiers":
    ["guillotina.contrib.dbusers.users.DBUserIdentifier"]
}


def includeme(root, settings):
    configure.scan("guillotina.contrib.dbusers.content.users")
    configure.scan("guillotina.contrib.dbusers.content.groups")
    configure.scan("guillotina.contrib.dbusers.install")
    configure.scan("guillotina.contrib.dbusers.services")
    configure.scan("guillotina.contrib.dbusers.subscribers")
    configure.scan("guillotina.contrib.dbusers.permissions")
    configure.scan("guillotina.contrib.dbusers.serializers")
Ejemplo n.º 2
0
# -*- encoding: utf-8 -*-

# load the patch before anything else.
from guillotina import glogging
from guillotina import patch  # noqa
from guillotina.i18n import MessageFactory


# create logging
logger = glogging.getLogger('guillotina')

_ = MessageFactory('guillotina')


app_settings = {
    "debug": False,
    "aiohttp_settings": {},
    "databases": [],
    "conflict_retry_attempts": 3,
    "host": "127.0.0.1",
    "port": 8080,
    "static": {},
    "jsapps": {},
    "default_static_filenames": ['index.html', 'index.htm'],
    "utilities": [],
    "store_json": True,
    "root_user": {
        "password": ""
    },
    "auth_extractors": [
        "guillotina.auth.extractors.BearerAuthPolicy",
Ejemplo n.º 3
0
##############################################################################
"""Component Architecture configuration handlers
"""
from guillotina.component._api import get_component_registry
from guillotina.component._compat import _BLANK
from guillotina.component._declaration import adaptedBy
from guillotina.component._declaration import getName
from guillotina.component.interface import provide_interface
from guillotina.exceptions import ComponentConfigurationError
from guillotina.i18n import MessageFactory
from zope.interface import implementedBy
from zope.interface import Interface
from zope.interface import providedBy


_ = MessageFactory("guillotina")


def handler(method_name, *args, **kwargs):
    method = getattr(get_component_registry(), method_name)
    method(*args, **kwargs)


def _rolledUpFactory(factories):  # noqa: N802
    # This has to be named 'factory', aparently, so as not to confuse
    # apidoc :(
    def factory(ob):
        for f in factories:
            ob = f(ob)
        return ob
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-
from guillotina import configure
from guillotina.i18n import MessageFactory

_ = MessageFactory('guillotina_dbusers')

app_settings = {
    "auth_user_identifiers": ["guillotina_dbusers.users.DBUserIdentifier"]
}

configure.permission("guillotina.NotAuthenticated", "")
configure.permission("guillotina.Authenticated", "")
configure.permission("guillotina.AddUser", title="Add plone user")
configure.permission("guillotina.AddGroup", title="Add plone group")
configure.grant(permission="guillotina.AccessContent",
                role="guillotina.Anonymous")
configure.grant(permission="guillotina.NotAuthenticated",
                role="guillotina.Anonymous")
configure.grant(permission="guillotina.Authenticated",
                role="guillotina.Authenticated")
configure.grant(permission="guillotina.AddUser",
                role="guillotina.ContainerAdmin")
configure.grant(permission="guillotina.AddGroup",
                role="guillotina.ContainerAdmin")


def includeme(root, settings):
    configure.scan('guillotina_dbusers.content.users')
    configure.scan('guillotina_dbusers.content.groups')
    configure.scan('guillotina_dbusers.install')
    configure.scan('guillotina_dbusers.services')
Ejemplo n.º 5
0
# -*- coding: utf-8 -*-
import glob

import yaml
from guillotina import configure
from guillotina.i18n import MessageFactory


_ = MessageFactory("guillotina_cms")

app_settings = {
    "applications": [
        "guillotina.contrib.catalog.pg",
        "guillotina.contrib.swagger",
        "guillotina.contrib.dbusers",
    ],
    "available_blocks": {},
    "commands": {"create-container": "guillotina_cms.commands.create.CMSCreateCommand"},
    "load_utilities": {
        "guillotina_cms.workflow": {
            "provides": "guillotina_cms.interfaces.IWorkflowUtility",
            "factory": "guillotina_cms.utilities.workflow.WorkflowUtility",
            "settings": {},
        }
    },
    "layouts": {
        "CMSFolder": [
            "listing_view",
            "tabular_view",
            "summary_view",
            "layout_view",
Ejemplo n.º 6
0
# -*- coding: utf-8 -*-
from guillotina.i18n import MessageFactory
from guillotina import configure

_ = MessageFactory('guillotina_cms')


def includeme(root):
    configure.scan('guillotina_cms.patch')
    configure.scan('guillotina_cms.permissions')
    configure.scan('guillotina_cms.api')
    configure.scan('guillotina_cms.install')
    configure.scan('guillotina_cms.json')
    configure.scan('guillotina_cms.fields')
    configure.scan('guillotina_cms.content')
    configure.scan('guillotina_cms.validator')
Ejemplo n.º 7
0
# -*- coding: utf-8 -*-
import glob

import yaml
from guillotina import configure
from guillotina.i18n import MessageFactory

_ = MessageFactory("guillotina_volto")

app_settings = {
    "applications": [
        "guillotina.contrib.catalog.pg",
        "guillotina.contrib.dyncontent",
        "guillotina.contrib.vocabularies",
        "guillotina.contrib.workflows",
        "guillotina.contrib.email_validation",
        "guillotina.contrib.templates",
        "guillotina.contrib.mailer",
        "guillotina.contrib.swagger",
        "guillotina.contrib.dbusers",
    ],
    "available_blocks": {},
    "commands": {
        "create-container": "guillotina_volto.commands.create.CMSCreateCommand"
    },
    "controlpanels": {
        "image_settings": {
            "title": "Image settings",
            "schema":
            "guillotina.contrib.email_validation.interfaces.IValidationSettings",
            "group": "General",