OpenSlides/server/openslides/saml/apps.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

37 lines
771 B
Python

import logging
from django.apps import AppConfig
from . import SAML_ENABLED
from .user_backend import SamlUserBackend
logger = logging.getLogger(__name__)
class SamlAppConfig(AppConfig):
name = "openslides.saml"
verbose_name = "OpenSlides SAML"
user_backend_class = SamlUserBackend
def get_angular_constants(self):
from .settings import get_saml_settings
return {"SamlSettings": get_saml_settings().general_settings}
def get_startup_hooks(self):
return {20: saml_startup}
def saml_startup():
# Import all required stuff.
from .settings import load_settings
if not SAML_ENABLED:
logger.info("SAML is disabled.")
return
load_settings()
logger.info("SAML is enabled and loaded.")