Skip to content
Commits on Source (10)
......@@ -6,6 +6,21 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`2.0rc1`_ - 2021-06-23
----------------------
Changed
~~~~~~~
* Add verbose name for preference section.
Fixed
~~~~~
* Preferences were evaluated before the app was ready.
* Disable LDAP sync by default to prevent loading with unexpected settings.
* Gracefully fail on missing LDAP data attributes.
`2.0b0`_ - 2021-05-21
---------------------
......@@ -39,3 +54,4 @@ Added
.. _2.0a2: https://edugit.org/AlekSIS/official/AlekSIS-App-LDAP/-/tags/2.0a2
.. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS-App-LDAP/-/tags/2.0b0
.. _2.0rc1: https://edugit.org/AlekSIS/Official/AlekSIS-App-LDAP/-/tags/2.0rc1
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -23,6 +23,10 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr ""
......@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login"
msgstr ""
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr ""
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr ""
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr ""
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr ""
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr ""
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr ""
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr ""
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr ""
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"PO-Revision-Date: 2021-05-22 13:19+0000\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: 2021-06-12 10:39+0000\n"
"Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n"
"Language-Team: German <https://translate.edugit.org/projects/aleksis/"
"aleksis-app-ldap/de/>\n"
......@@ -24,81 +24,110 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr "LDAP Distinguished Name (DN)"
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr "LDAP"
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr "LDAP-Synchronisation aktivieren"
#: aleksis/apps/ldap/preferences.py:26
msgid "Create missing persons for LDAP users"
msgstr "Fehlende Personen für LDAP-Nutzer erstellen"
msgstr "Fehlende Personen für LDAP-Benutzer erstellen"
#: aleksis/apps/ldap/preferences.py:35
msgid "Sync LDAP user with person on login"
msgstr "LDAP-Nutzer bei der Anmeldung synchronisieren"
msgstr "LDAP-Benutzer bei der Anmeldung synchronisieren"
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr "LDAP-Benutzer bei der Registrierung erstellen"
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr "Komma-separierte Liste von RDN-Felder für neue Benutzereinträge"
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr "LDAP-Synchronisation von Gruppen aktivieren"
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr "Feld für den Kurznamen der Gruppe"
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
"Regulärer Ausdruck zum Abgleich des LDAP-Wertes für den Gruppenkurznamen"
msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für den Gruppenkurznamen"
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "z.B. class_(?P<class>.*); trenne mehrere Muster durch |"
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr "Ersatzvorlage zur Anwendung auf Gruppenkurznamen"
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "z.B. \\g<class>; trenne mehrere Vorlagen durch |"
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr "Feld für Gruppennamen"
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für den Gruppennamen,"
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr "Ersatzvorlage zur Anwendung auf den Gruppennamen"
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr "LDAP Feld mit dn vom Gruppeneigentümer"
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr "LDAP-Synchronisation für passende Felder durchführen"
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr "Distinguished Name (DN)"
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr "UID"
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr "LDAP-Passwort bei AlekSIS-Passwortänderung ändern"
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
"Admin-Konto (oder Auth-Konto, wenn nicht gesetzt) nutzen, um Passwörter zu "
"ändern"
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr "DN des LDAP-Admin-Kontos (wenn verschieden zu LDAP-Auth-Konto)"
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr "Passwort des LDAP-Admin-Kontos (wenn verschieden zu LDAP-Auth-Konto)"
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "LDAP-Feld für '{field.verbose_name}' in {model._meta.label}"
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für"
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "Ersatzvorlage zur Anwendung auf '{field.verbose_name}'"
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -23,6 +23,10 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr ""
......@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login"
msgstr ""
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr ""
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr ""
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr ""
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr ""
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr ""
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr ""
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr ""
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr ""
......@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr ""
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr ""
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr ""
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr ""
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr ""
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr ""
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr ""
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr ""
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr ""
......@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr ""
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr ""
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr ""
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr ""
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr ""
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr ""
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr ""
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr ""
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-20 21:06+0200\n"
"POT-Creation-Date: 2021-06-08 16:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync"
msgstr ""
......@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr ""
#: aleksis/apps/ldap/preferences.py:44
msgid "Create LDAP user on registration"
msgstr ""
#: aleksis/apps/ldap/preferences.py:52
msgid "Comma-separated list of RDN fields for new user entries"
msgstr ""
#: aleksis/apps/ldap/preferences.py:61
msgid "Enable ldap group sync"
msgstr ""
#: aleksis/apps/ldap/preferences.py:53
#: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:63
#: aleksis/apps/ldap/preferences.py:80
msgid "Regular expression to match LDAP value for group short name against"
msgstr ""
#: aleksis/apps/ldap/preferences.py:64 aleksis/apps/ldap/preferences.py:96
#: aleksis/apps/ldap/preferences.py:81 aleksis/apps/ldap/preferences.py:113
msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:74
#: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:75 aleksis/apps/ldap/preferences.py:107
#: aleksis/apps/ldap/preferences.py:92 aleksis/apps/ldap/preferences.py:124
msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr ""
#: aleksis/apps/ldap/preferences.py:85
#: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group"
msgstr ""
#: aleksis/apps/ldap/preferences.py:95
#: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against,"
msgstr ""
#: aleksis/apps/ldap/preferences.py:106
#: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:117
#: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner"
msgstr ""
#: aleksis/apps/ldap/preferences.py:127 aleksis/apps/ldap/util/ldap_sync.py:121
#: aleksis/apps/ldap/preferences.py:144 aleksis/apps/ldap/util/ldap_sync.py:122
msgid "LDAP sync matching fields"
msgstr ""
#: aleksis/apps/ldap/preferences.py:129
#: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name"
msgstr ""
#: aleksis/apps/ldap/preferences.py:130
#: aleksis/apps/ldap/preferences.py:147
msgid "UID"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:86
#: aleksis/apps/ldap/preferences.py:158
msgid "Change LDAP password on AlekSIS password change"
msgstr ""
#: aleksis/apps/ldap/preferences.py:167
msgid "Use admin account (or auth account if unset) to change passwords"
msgstr ""
#: aleksis/apps/ldap/preferences.py:176
msgid "DN of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/preferences.py:185
msgid "Password of LDAP admin account (if other than LDAP auth account)"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:87
#, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:96
#: aleksis/apps/ldap/util/ldap_sync.py:97
msgid "Regular expression to match LDAP value for"
msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108
#: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr ""
......@@ -5,14 +5,14 @@ from dynamic_preferences.types import BooleanPreference, ChoicePreference, Strin
from aleksis.core.registries import site_preferences_registry
ldap = Section("ldap")
ldap = Section("ldap", verbose_name=_("LDAP"))
@site_preferences_registry.register
class EnableLDAPSync(BooleanPreference):
section = ldap
name = "enable_sync"
default = True
default = False
required = False
verbose_name = _("Enable LDAP sync")
......
......@@ -18,8 +18,6 @@ from tqdm import tqdm
from aleksis.core.registries import site_preferences_registry
from aleksis.core.util.core_helpers import get_site_preferences
from ..preferences import ldap as section_ldap
logger = logging.getLogger(__name__)
TQDM_DEFAULTS = {
......@@ -74,6 +72,8 @@ def from_ldap(value, field, dn, ldap_field, instance=None):
def update_dynamic_preferences():
"""Auto-generate sync field settings from models."""
from ..preferences import ldap as section_ldap # noqa
Person = apps.get_model("core", "Person")
for model in (Person,):
# Collect fields that are matchable
......@@ -210,7 +210,7 @@ def ldap_sync_user_on_login(sender, user, ldap_user, **kwargs):
except Person.MultipleObjectsReturned:
logger.error(f"More than one matching person for user {user.username}")
return
except (DataError, IntegrityError, ValueError) as e:
except (DataError, IntegrityError, KeyError, ValueError) as e:
logger.error(f"Data error while synchronising user {user.username}:\n{e}")
return
......
This diff is collapsed.
[tool.poetry]
name = "AlekSIS-App-LDAP"
version = "2.0b0"
version = "2.0rc1"
packages = [
{ include = "aleksis" }
]
......@@ -33,7 +33,7 @@ secondary = true
python = "^3.9"
django-ldapdb = "^1.4.0"
tqdm = "^4.44.1"
aleksis-core = {version = "^2.0b0", extras = ["ldap"]}
aleksis-core = {version = "^2.0rc", extras = ["ldap"]}
python-magic = "^0.4.22"
[tool.poetry.dev-dependencies]
......