diff --git a/eva/settings.py b/eva/settings.py index 06d5ab4..1491fd4 100644 --- a/eva/settings.py +++ b/eva/settings.py @@ -133,6 +133,11 @@ STATIC_URL = '/static/' # settings needed for allauth +SOCIALACCOUNT_PROVIDERS = { + 'nextcloud': { + 'SERVER': 'https://wolke.wikimedia.de/', + } +} AUTHENTICATION_BACKENDS = ( "django.contrib.auth.backends.ModelBackend", diff --git a/evapp/templates/evapp/employee_form.html b/evapp/templates/evapp/employee_form.html index bbb5796..5d1546d 100644 --- a/evapp/templates/evapp/employee_form.html +++ b/evapp/templates/evapp/employee_form.html @@ -11,6 +11,8 @@ <link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}" /> +{% load socialaccount %} +{% if user.is_authenticated %} {% block content %} <center> <style> @@ -87,3 +89,6 @@ <p> </center> {% endblock %} +{% else %} +<a href="{% provider_login_url 'nextcloud' %}">Bitte einloggen!</a> +{% endif %}