From c941107d42bc0f0a9f57fc1807dca3da5ad92704 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 21 Feb 2019 16:06:57 +0100 Subject: [PATCH] Rules -> Policies, more things --- passbook/admin/forms/source.py | 2 +- .../templates/administration/audit/list.html | 19 +-- .../templates/administration/overview.html | 124 +++++++++++------- passbook/admin/views/overview.py | 6 +- .../migrations/0002_auto_20190221_1201.py | 18 +++ .../migrations/0003_auto_20190221_1240.py | 23 ++++ passbook/audit/models.py | 14 +- passbook/core/auth/factor.py | 4 +- passbook/core/auth/view.py | 5 +- passbook/core/forms/applications.py | 5 + passbook/core/forms/authentication.py | 5 + passbook/core/forms/factors.py | 2 +- .../migrations/0005_auto_20190221_1201.py | 28 ++++ .../core/migrations/0006_factor_arguments.py | 19 +++ .../migrations/0007_auto_20190221_1233.py | 19 +++ passbook/core/models.py | 2 + passbook/core/policies.py | 2 +- passbook/core/settings.py | 2 +- passbook/core/templates/login/base.html | 2 +- .../core/templates/login/factors/backend.html | 6 +- .../core/templates/login/factors/base.html | 31 +++++ passbook/core/templates/login/login_alt.html | 68 ---------- passbook/core/templates/overview/base.html | 6 +- passbook/core/templates/user/base.html | 16 ++- .../core/templates/user/change_password.html | 14 ++ passbook/core/views/overview.py | 1 + passbook/ldap/forms.py | 8 +- passbook/lib/default.yml | 22 +--- passbook/lib/models.py | 2 +- passbook/lib/templatetags/utils.py | 31 ++++- passbook/oauth_client/models.py | 2 +- 31 files changed, 333 insertions(+), 175 deletions(-) create mode 100644 passbook/audit/migrations/0002_auto_20190221_1201.py create mode 100644 passbook/audit/migrations/0003_auto_20190221_1240.py create mode 100644 passbook/core/migrations/0005_auto_20190221_1201.py create mode 100644 passbook/core/migrations/0006_factor_arguments.py create mode 100644 passbook/core/migrations/0007_auto_20190221_1233.py create mode 100644 passbook/core/templates/login/factors/base.html delete mode 100644 passbook/core/templates/login/login_alt.html create mode 100644 passbook/core/templates/user/change_password.html diff --git a/passbook/admin/forms/source.py b/passbook/admin/forms/source.py index 25052bb4a..b201d5067 100644 --- a/passbook/admin/forms/source.py +++ b/passbook/admin/forms/source.py @@ -1,6 +1,6 @@ """passbook core source form fields""" # from django import forms -SOURCE_FORM_FIELDS = ['name', 'slug', 'enabled'] +SOURCE_FORM_FIELDS = ['name', 'slug', 'enabled', 'policies'] # class SourceForm(forms.Form) diff --git a/passbook/admin/templates/administration/audit/list.html b/passbook/admin/templates/administration/audit/list.html index 68a3703a8..c47263f26 100644 --- a/passbook/admin/templates/administration/audit/list.html +++ b/passbook/admin/templates/administration/audit/list.html @@ -8,7 +8,6 @@ {% endblock %} {% block content %} -

{% trans "Audit Log" %}

{% for entry in object_list %} @@ -23,27 +22,31 @@ {{ entry.action }}
+ {{ entry.context }}
- - {{ entry.user }} + + {{ entry.user }}
- - {{ entry.request_ip }} + + {{ entry.app|default:'-' }}
- - {{ entry.app|default:'-' }} + + {{ entry.created }} +
+
+ + {{ entry.request_ip }}
{% endfor %} -