Skip to content
Snippets Groups Projects
Commit b3b948af authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'prepare-release-2.0rc1' into 'release/2.0'

Prepare release 2.0rc1

See merge request AlekSIS/official/AlekSIS-App-LDAP!75
parents 6109c454 5b430a93
No related branches found
Tags 2.0rc1
No related merge requests found
...@@ -6,6 +6,21 @@ All notable changes to this project will be documented in this file. ...@@ -6,6 +6,21 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_, The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_. 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 `2.0b0`_ - 2021-05-21
--------------------- ---------------------
...@@ -39,3 +54,4 @@ Added ...@@ -39,3 +54,4 @@ Added
.. _2.0a2: https://edugit.org/AlekSIS/official/AlekSIS-App-LDAP/-/tags/2.0a2 .. _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.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 "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -23,6 +23,10 @@ msgstr "" ...@@ -23,6 +23,10 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "" msgstr ""
...@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login" ...@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:44 #: 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" msgid "Enable ldap group sync"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:53 #: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group" msgid "Field for short name of group"
msgstr "" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" 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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:74 #: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name" msgid "Replacement template to apply to group short name"
msgstr "" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:85 #: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group" msgid "Field for name of group"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:95 #: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against," msgid "Regular expression to match LDAP value for group name against,"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:106 #: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name" msgid "Replacement template to apply to group name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:117 #: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner" msgid "LDAP field with dn of group owner"
msgstr "" 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" msgid "LDAP sync matching fields"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "" 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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "" 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" msgid "Regular expression to match LDAP value for"
msgstr "" msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108 #: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "" msgstr ""
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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: 2021-05-22 13:19+0000\n" "PO-Revision-Date: 2021-06-12 10:39+0000\n"
"Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n" "Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n"
"Language-Team: German <https://translate.edugit.org/projects/aleksis/" "Language-Team: German <https://translate.edugit.org/projects/aleksis/"
"aleksis-app-ldap/de/>\n" "aleksis-app-ldap/de/>\n"
...@@ -24,81 +24,110 @@ msgstr "" ...@@ -24,81 +24,110 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "LDAP Distinguished Name (DN)" msgstr "LDAP Distinguished Name (DN)"
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr "LDAP"
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "LDAP-Synchronisation aktivieren" msgstr "LDAP-Synchronisation aktivieren"
#: aleksis/apps/ldap/preferences.py:26 #: aleksis/apps/ldap/preferences.py:26
msgid "Create missing persons for LDAP users" 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 #: aleksis/apps/ldap/preferences.py:35
msgid "Sync LDAP user with person on login" 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 #: 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" msgid "Enable ldap group sync"
msgstr "LDAP-Synchronisation von Gruppen aktivieren" 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" msgid "Field for short name of group"
msgstr "Feld für den Kurznamen der Gruppe" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für den Gruppenkurznamen"
"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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "z.B. class_(?P<class>.*); trenne mehrere Muster durch |" 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" msgid "Replacement template to apply to group short name"
msgstr "Ersatzvorlage zur Anwendung auf Gruppenkurznamen" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "z.B. \\g<class>; trenne mehrere Vorlagen durch |" 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" msgid "Field for name of group"
msgstr "Feld für Gruppennamen" 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," msgid "Regular expression to match LDAP value for group name against,"
msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für den Gruppennamen," 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" msgid "Replacement template to apply to group name"
msgstr "Ersatzvorlage zur Anwendung auf den Gruppennamen" 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" msgid "LDAP field with dn of group owner"
msgstr "LDAP Feld mit dn vom Gruppeneigentümer" 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" msgid "LDAP sync matching fields"
msgstr "LDAP-Synchronisation für passende Felder durchführen" msgstr "LDAP-Synchronisation für passende Felder durchführen"
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "Distinguished Name (DN)" msgstr "Distinguished Name (DN)"
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "LDAP-Feld für '{field.verbose_name}' in {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" msgid "Regular expression to match LDAP value for"
msgstr "Regulärer Ausdruck zum Abgleich des LDAP-Wertes für" 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 #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "Ersatzvorlage zur Anwendung auf '{field.verbose_name}'" msgstr "Ersatzvorlage zur Anwendung auf '{field.verbose_name}'"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -23,6 +23,10 @@ msgstr "" ...@@ -23,6 +23,10 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "" msgstr ""
...@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login" ...@@ -36,67 +40,91 @@ msgid "Sync LDAP user with person on login"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:44 #: 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" msgid "Enable ldap group sync"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:53 #: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group" msgid "Field for short name of group"
msgstr "" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" 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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:74 #: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name" msgid "Replacement template to apply to group short name"
msgstr "" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:85 #: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group" msgid "Field for name of group"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:95 #: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against," msgid "Regular expression to match LDAP value for group name against,"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:106 #: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name" msgid "Replacement template to apply to group name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:117 #: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner" msgid "LDAP field with dn of group owner"
msgstr "" 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" msgid "LDAP sync matching fields"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "" 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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "" 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" msgid "Regular expression to match LDAP value for"
msgstr "" msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108 #: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "" msgstr ""
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -22,6 +22,10 @@ msgstr "" ...@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "" msgstr ""
...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login" ...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:44 #: 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" msgid "Enable ldap group sync"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:53 #: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group" msgid "Field for short name of group"
msgstr "" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" 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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:74 #: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name" msgid "Replacement template to apply to group short name"
msgstr "" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:85 #: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group" msgid "Field for name of group"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:95 #: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against," msgid "Regular expression to match LDAP value for group name against,"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:106 #: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name" msgid "Replacement template to apply to group name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:117 #: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner" msgid "LDAP field with dn of group owner"
msgstr "" 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" msgid "LDAP sync matching fields"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "" 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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "" 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" msgid "Regular expression to match LDAP value for"
msgstr "" msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108 #: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "" msgstr ""
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -22,6 +22,10 @@ msgstr "" ...@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "" msgstr ""
...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login" ...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:44 #: 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" msgid "Enable ldap group sync"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:53 #: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group" msgid "Field for short name of group"
msgstr "" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" 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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:74 #: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name" msgid "Replacement template to apply to group short name"
msgstr "" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:85 #: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group" msgid "Field for name of group"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:95 #: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against," msgid "Regular expression to match LDAP value for group name against,"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:106 #: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name" msgid "Replacement template to apply to group name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:117 #: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner" msgid "LDAP field with dn of group owner"
msgstr "" 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" msgid "LDAP sync matching fields"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "" 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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "" 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" msgid "Regular expression to match LDAP value for"
msgstr "" msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108 #: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "" msgstr ""
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -22,6 +22,10 @@ msgstr "" ...@@ -22,6 +22,10 @@ msgstr ""
msgid "LDAP Distinguished Name" msgid "LDAP Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:8
msgid "LDAP"
msgstr ""
#: aleksis/apps/ldap/preferences.py:17 #: aleksis/apps/ldap/preferences.py:17
msgid "Enable LDAP sync" msgid "Enable LDAP sync"
msgstr "" msgstr ""
...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login" ...@@ -35,67 +39,91 @@ msgid "Sync LDAP user with person on login"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:44 #: 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" msgid "Enable ldap group sync"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:53 #: aleksis/apps/ldap/preferences.py:70
msgid "Field for short name of group" msgid "Field for short name of group"
msgstr "" 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" msgid "Regular expression to match LDAP value for group short name against"
msgstr "" 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 |" msgid "e.g. class_(?P<class>.*); separate multiple patterns by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:74 #: aleksis/apps/ldap/preferences.py:91
msgid "Replacement template to apply to group short name" msgid "Replacement template to apply to group short name"
msgstr "" 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 |" msgid "e.g. \\g<class>; separate multiple templates by |"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:85 #: aleksis/apps/ldap/preferences.py:102
msgid "Field for name of group" msgid "Field for name of group"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:95 #: aleksis/apps/ldap/preferences.py:112
msgid "Regular expression to match LDAP value for group name against," msgid "Regular expression to match LDAP value for group name against,"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:106 #: aleksis/apps/ldap/preferences.py:123
msgid "Replacement template to apply to group name" msgid "Replacement template to apply to group name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:117 #: aleksis/apps/ldap/preferences.py:134
msgid "LDAP field with dn of group owner" msgid "LDAP field with dn of group owner"
msgstr "" 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" msgid "LDAP sync matching fields"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:129 #: aleksis/apps/ldap/preferences.py:146
msgid "Distinguished Name" msgid "Distinguished Name"
msgstr "" msgstr ""
#: aleksis/apps/ldap/preferences.py:130 #: aleksis/apps/ldap/preferences.py:147
msgid "UID" msgid "UID"
msgstr "" 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 #, python-brace-format
msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}" msgid "LDAP field for '{field.verbose_name}' on {model._meta.label}"
msgstr "" 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" msgid "Regular expression to match LDAP value for"
msgstr "" msgstr ""
#: aleksis/apps/ldap/util/ldap_sync.py:108 #: aleksis/apps/ldap/util/ldap_sync.py:109
#, python-brace-format #, python-brace-format
msgid "Replacement template to apply to '{field.verbose_name}'" msgid "Replacement template to apply to '{field.verbose_name}'"
msgstr "" msgstr ""
...@@ -5,14 +5,14 @@ from dynamic_preferences.types import BooleanPreference, ChoicePreference, Strin ...@@ -5,14 +5,14 @@ from dynamic_preferences.types import BooleanPreference, ChoicePreference, Strin
from aleksis.core.registries import site_preferences_registry from aleksis.core.registries import site_preferences_registry
ldap = Section("ldap") ldap = Section("ldap", verbose_name=_("LDAP"))
@site_preferences_registry.register @site_preferences_registry.register
class EnableLDAPSync(BooleanPreference): class EnableLDAPSync(BooleanPreference):
section = ldap section = ldap
name = "enable_sync" name = "enable_sync"
default = True default = False
required = False required = False
verbose_name = _("Enable LDAP sync") verbose_name = _("Enable LDAP sync")
......
...@@ -18,8 +18,6 @@ from tqdm import tqdm ...@@ -18,8 +18,6 @@ from tqdm import tqdm
from aleksis.core.registries import site_preferences_registry from aleksis.core.registries import site_preferences_registry
from aleksis.core.util.core_helpers import get_site_preferences from aleksis.core.util.core_helpers import get_site_preferences
from ..preferences import ldap as section_ldap
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
TQDM_DEFAULTS = { TQDM_DEFAULTS = {
...@@ -74,6 +72,8 @@ def from_ldap(value, field, dn, ldap_field, instance=None): ...@@ -74,6 +72,8 @@ def from_ldap(value, field, dn, ldap_field, instance=None):
def update_dynamic_preferences(): def update_dynamic_preferences():
"""Auto-generate sync field settings from models.""" """Auto-generate sync field settings from models."""
from ..preferences import ldap as section_ldap # noqa
Person = apps.get_model("core", "Person") Person = apps.get_model("core", "Person")
for model in (Person,): for model in (Person,):
# Collect fields that are matchable # Collect fields that are matchable
...@@ -210,7 +210,7 @@ def ldap_sync_user_on_login(sender, user, ldap_user, **kwargs): ...@@ -210,7 +210,7 @@ def ldap_sync_user_on_login(sender, user, ldap_user, **kwargs):
except Person.MultipleObjectsReturned: except Person.MultipleObjectsReturned:
logger.error(f"More than one matching person for user {user.username}") logger.error(f"More than one matching person for user {user.username}")
return 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}") logger.error(f"Data error while synchronising user {user.username}:\n{e}")
return return
......
This diff is collapsed.
[tool.poetry] [tool.poetry]
name = "AlekSIS-App-LDAP" name = "AlekSIS-App-LDAP"
version = "2.0b0" version = "2.0rc1"
packages = [ packages = [
{ include = "aleksis" } { include = "aleksis" }
] ]
...@@ -33,7 +33,7 @@ secondary = true ...@@ -33,7 +33,7 @@ secondary = true
python = "^3.9" python = "^3.9"
django-ldapdb = "^1.4.0" django-ldapdb = "^1.4.0"
tqdm = "^4.44.1" tqdm = "^4.44.1"
aleksis-core = {version = "^2.0b0", extras = ["ldap"]} aleksis-core = {version = "^2.0rc", extras = ["ldap"]}
python-magic = "^0.4.22" python-magic = "^0.4.22"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment