Added Organization Manager.

This is a Flamenco/Attract-style Manager object that's instantiated by
the PillarApplication. It can create Organizations and assign/remove
users.

Also I updated the Organization schema to reflect the currently desired
design.

NOTA BENE: this does not include any security/authorisation checks on Eve's
organizations collection.
This commit is contained in:
2017-08-22 16:39:02 +02:00
parent 87afbc52f6
commit 93d534fe94
4 changed files with 439 additions and 46 deletions

View File

@@ -39,6 +39,7 @@ import pillar.web.jinja
from . import api
from . import web
from . import auth
import pillar.api.organizations
empty_settings = {
# Use a random URL prefix when booting Eve, to ensure that any
@@ -121,6 +122,8 @@ class PillarServer(Eve):
# Celery itself is configured after all extensions have loaded.
self.celery: Celery = None
self.org_manager = pillar.api.organizations.OrgManager()
self.before_first_request(self.setup_db_indices)
def _load_flask_config(self):