#48 Changes autocomplete

* changes the autocomplete route for user retrieving from _istartswith to full qualified check
* extends the help text for form to inform about full qualified username needed
* updates translation
This commit is contained in:
mpeltriaux 2021-12-14 13:55:08 +01:00
parent 7edad208a1
commit 8b17ab6fdc
5 changed files with 6 additions and 6 deletions

View File

@ -36,7 +36,7 @@ class ShareModalForm(BaseModalForm):
user_select = forms.ModelMultipleChoiceField(
label=_("Add user to share with"),
label_suffix="",
help_text=_("Multiple selection possible - You can only select users which do not already have access"),
help_text=_("Multiple selection possible - You can only select users which do not already have access. Enter the full username."),
required=False,
queryset=User.objects.all(),
widget=autocomplete.ModelSelect2Multiple(

View File

@ -79,7 +79,7 @@ class ShareUserAutocomplete(Select2QuerySetView):
)
if self.q:
qs = qs.filter(
username__istartswith=self.q
username=self.q
)
return qs

View File

@ -51,8 +51,8 @@ PAGE_DEFAULT = 1
# SSO settings
SSO_SERVER_BASE = "http://127.0.0.1:8000/"
SSO_SERVER = f"{SSO_SERVER_BASE}sso/"
SSO_PRIVATE_KEY = "CHANGE_ME"
SSO_PUBLIC_KEY = "CHANGE_ME"
SSO_PRIVATE_KEY = "U7OjCbElNDchUvh9WVzfOfC4juJQC9HGZI9tSdjmeFe0MDTw7BCNBv4MigJ79dlJ"
SSO_PUBLIC_KEY = "PnxIZFewXVoL0FG2wMr3DCGgLCHOwR6JE9GYJCZHazVjlDgOZFl3qiB4dWsAZRF5"
# MAPS
DEFAULT_LAT = 50.00

Binary file not shown.

View File

@ -1289,10 +1289,10 @@ msgstr "Nutzer direkt hinzufügen"
#: intervention/forms/modalForms.py:39
msgid ""
"Multiple selection possible - You can only select users which do not already "
"have access"
"have access. Enter the full username."
msgstr ""
"Mehrfachauswahl möglich - Sie können nur Nutzer wählen, für die der Eintrag "
"noch nicht freigegeben wurde"
"noch nicht freigegeben wurde. Geben Sie den ganzen Nutzernamen an."
#: intervention/forms/modalForms.py:55
msgid "Remove check to remove access for this user"