From 6ec37dbe110198c03610a8be9ed29accb04e90a5 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 15 Nov 2021 14:00:08 +0100 Subject: [PATCH] #38 User requests * implements 3) "Extend sharing on direct adding of users" --- intervention/forms/modalForms.py | 65 +++++++++++++------ intervention/views.py | 3 +- konova/autocompletes.py | 24 +++++++ konova/urls.py | 4 +- konova/utils/user_checks.py | 14 ++++ locale/de/LC_MESSAGES/django.mo | Bin 26917 -> 27204 bytes locale/de/LC_MESSAGES/django.po | 106 +++++++++++++++++-------------- 7 files changed, 147 insertions(+), 69 deletions(-) diff --git a/intervention/forms/modalForms.py b/intervention/forms/modalForms.py index b126f474..fb6ee083 100644 --- a/intervention/forms/modalForms.py +++ b/intervention/forms/modalForms.py @@ -16,10 +16,9 @@ from compensation.models import EcoAccount, EcoAccountDeduction from intervention.inputs import TextToClipboardInput from intervention.models import Revocation, RevocationDocument, Intervention from konova.forms import BaseModalForm -from konova.settings import ZB_GROUP, ETS_GROUP from konova.utils.general import format_german_float from konova.utils.messenger import Messenger -from konova.utils.user_checks import in_group +from konova.utils.user_checks import is_default_group_only from user.models import UserActionLogEntry, UserAction @@ -36,6 +35,21 @@ class ShareInterventionModalForm(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"), + required=False, + queryset=User.objects.all(), + widget=autocomplete.ModelSelect2Multiple( + url="share-user-autocomplete", + attrs={ + "data-placeholder": _("Click for selection"), + "data-minimum-input-length": 3, + }, + forward=["users"] + ), + ) users = forms.MultipleChoiceField( label=_("Shared with"), label_suffix="", @@ -78,28 +92,39 @@ class ShareInterventionModalForm(BaseModalForm): ) # Initialize users field - # Remove field if user is not in registration or conservation group - if not in_group(self.request.user, ZB_GROUP) and not in_group(self.request.user, ETS_GROUP): - del self.fields["users"] - else: - users = self.instance.users.all() - choices = [] - for n in users: - choices.append( - (n.id, n.username) - ) - self.fields["users"].choices = choices - u_ids = list(users.values_list("id", flat=True)) - self.initialize_form_field( - "users", - u_ids + # Disable field if user is not in registration or conservation group + if is_default_group_only(self.request.user): + self.disable_form_field("users") + + self._add_user_choices_to_field() + + def _add_user_choices_to_field(self): + """ Transforms the instance's sharing users into a list for the form field + + Returns: + + """ + users = self.instance.users.all() + choices = [] + for n in users: + choices.append( + (n.id, n.username) ) + self.fields["users"].choices = choices + u_ids = list(users.values_list("id", flat=True)) + self.initialize_form_field( + "users", + u_ids + ) def save(self): - accessing_users = User.objects.filter( - id__in=self.cleaned_data["users"] + still_accessing_users = self.cleaned_data["users"] + new_accessing_users = list(self.cleaned_data["user_select"].values_list("id", flat=True)) + accessing_users = still_accessing_users + new_accessing_users + users = User.objects.filter( + id__in=accessing_users ) - self.instance.share_with_list(accessing_users) + self.instance.share_with_list(users) class NewRevocationModalForm(BaseModalForm): diff --git a/intervention/views.py b/intervention/views.py index 8c0838c9..c2a87d6e 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -11,7 +11,6 @@ from intervention.tables import InterventionTable from konova.contexts import BaseContext from konova.decorators import * from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm, RecordModalForm -from konova.sub_settings.django_settings import DEFAULT_DATE_FORMAT from konova.utils.documents import remove_document, get_document from konova.utils.generators import generate_qr_code from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED, \ @@ -403,7 +402,7 @@ def create_share_view(request: HttpRequest, id: str): """ intervention = get_object_or_404(Intervention, id=id) - form = ShareInterventionModalForm(request.POST or None, instance=intervention, request=request) + form = ShareInterventionModalForm(request.POST or None, instance=intervention, request=request, user=request.user) return form.process_request( request, msg_success=_("Share settings updated") diff --git a/konova/autocompletes.py b/konova/autocompletes.py index 36e585bd..f0fb0fe0 100644 --- a/konova/autocompletes.py +++ b/konova/autocompletes.py @@ -6,6 +6,7 @@ Created on: 07.12.20 """ from dal_select2.views import Select2QuerySetView +from django.contrib.auth.models import User from django.db.models import Q from codelist.models import KonovaCode @@ -60,6 +61,29 @@ class InterventionAutocomplete(Select2QuerySetView): return qs +class ShareUserAutocomplete(Select2QuerySetView): + """ Autocomplete for intervention entries + + Only returns entries that are accessible for the requesting user + + """ + def get_queryset(self): + if self.request.user.is_anonymous: + return User.objects.none() + exclude_user_ids = self.forwarded.get("users", [None]) + _exclude = {"id__in": exclude_user_ids} + qs = User.objects.all().exclude( + **_exclude + ).order_by( + "username" + ) + if self.q: + qs = qs.filter( + username__istartswith=self.q + ) + return qs + + class KonovaCodeAutocomplete(Select2QuerySetView): """ Provides simple autocomplete functionality for codes diff --git a/konova/urls.py b/konova/urls.py index 820de41b..1954d298 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -19,7 +19,8 @@ from django.urls import path, include from konova.autocompletes import EcoAccountAutocomplete, \ InterventionAutocomplete, CompensationActionCodeAutocomplete, BiotopeCodeAutocomplete, LawCodeAutocomplete, \ - RegistrationOfficeCodeAutocomplete, ConservationOfficeCodeAutocomplete, ProcessTypeCodeAutocomplete + RegistrationOfficeCodeAutocomplete, ConservationOfficeCodeAutocomplete, ProcessTypeCodeAutocomplete, \ + ShareUserAutocomplete from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG from konova.sso.sso import KonovaSSOClient from konova.views import logout_view, home_view, remove_deadline_view @@ -50,6 +51,7 @@ urlpatterns = [ path("atcmplt/codes/prc-type", ProcessTypeCodeAutocomplete.as_view(), name="codes-process-type-autocomplete"), path("atcmplt/codes/reg-off", RegistrationOfficeCodeAutocomplete.as_view(), name="codes-registration-office-autocomplete"), path("atcmplt/codes/cons-off", ConservationOfficeCodeAutocomplete.as_view(), name="codes-conservation-office-autocomplete"), + path("atcmplt/share/u", ShareUserAutocomplete.as_view(), name="share-user-autocomplete"), ] if DEBUG: diff --git a/konova/utils/user_checks.py b/konova/utils/user_checks.py index d6b688b4..a01dadbe 100644 --- a/konova/utils/user_checks.py +++ b/konova/utils/user_checks.py @@ -7,6 +7,8 @@ Created on: 02.07.21 """ from django.contrib.auth.models import User +from konova.settings import ETS_GROUP, ZB_GROUP + def in_group(user: User, group: str) -> bool: """ Checks if the user is part of a group @@ -21,3 +23,15 @@ def in_group(user: User, group: str) -> bool: return user.groups.filter( name=group ) + + +def is_default_group_only(user: User) -> bool: + """ Checks if the user is only part of the default group + + Args: + user (User): The user object + + Returns: + bool + """ + return not in_group(user, ZB_GROUP) and not in_group(user, ETS_GROUP) \ No newline at end of file diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 21785a438150888491cb8801b636a84d86bdb053..066b53d9fcd24334359875c6ffb6bd53833d6cb6 100644 GIT binary patch delta 8676 zcmYk>2YglK8OQMx$Ra>O*hv_d5kd$nVTLfm4h9m2tTHn$B$6Q+EP*RR6q_qh)8-)zq<$LfJC4seOMx++%NUB^n10c<7dVZOKAl#m^U2s0)3Fg| zV>p&t{XPt%z6qP)lc?(tqV7M1&G8~OV0`CCJK^8Sy`Tv;@)Kh45A+1nfz;I5frqduBeG5p;DHDx^Wh2 zFBe+-2Gk06U^Co@TH#x$6<4DM_!`yk�{mj&=Ksz)0%dV#$A73Mn*bfE?6~_hK-v zxB4TfiEKj+T#3ra>vsMvROa4Af4qQN*d^42end?qpo=?^rdW@9bQkikfqKxO4*O#& z4#9p{j^$W|N_BdiJApYELVY2s zK{w=L6c(WdTyO0asMl-@s>AJeem82OPh$go)jW>cs&m)^KS%Xnr-yrgeN_LAYi0ji zP?$hNE9{L0sJ(px`{Fa$1}~!r{d>9(YcwhY!%-8Mj2bW#mHK6<)Nep-(N1iL2T_@N z6NB{rpQoT1T{b^Qb^ImjnedBuZ>*2XLaT?a3p8iP*?)3$zl@_7;y&J=D zEo!2hun|6y!2WAy&(ok4y=EtlS^Xo_fS=+Byn;$`&tC2TDX0`rL0y-J8fYP^-&LrA z)}yv^8|wP^Q4{>47x~v-)zHuc!*~Efu>)%62^fw8P!k-B+RG`Z>+?|`wX0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a=th!PZC3|u?3#7 zvS>xzMyKtpE!g}Do7rHeC_ilNgK)l;MFvsTu2X#in*NrMU5g%N>\n" "Language-Team: LANGUAGE \n" @@ -56,7 +56,7 @@ msgstr "Verantwortliche Stelle" #: analysis/forms.py:58 compensation/forms/forms.py:87 #: compensation/forms/forms.py:138 intervention/forms/forms.py:63 #: intervention/forms/forms.py:80 intervention/forms/forms.py:96 -#: intervention/forms/forms.py:112 +#: intervention/forms/forms.py:112 intervention/forms/modalForms.py:48 msgid "Click for selection" msgstr "Auswählen..." @@ -210,7 +210,7 @@ msgstr "Abbuchungen" #: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36 #: ema/templates/ema/detail/includes/states-after.html:36 #: ema/templates/ema/detail/includes/states-before.html:36 -#: intervention/forms/modalForms.py:276 +#: intervention/forms/modalForms.py:291 msgid "Surface" msgstr "Fläche" @@ -273,7 +273,7 @@ msgid "Type" msgstr "Typ" #: analysis/templates/analysis/reports/includes/old_data/amount.html:24 -#: intervention/forms/modalForms.py:287 intervention/forms/modalForms.py:294 +#: intervention/forms/modalForms.py:302 intervention/forms/modalForms.py:309 #: intervention/tables.py:88 #: intervention/templates/intervention/detail/view.html:19 #: konova/templates/konova/home.html:11 templates/navbars/navbar.html:22 @@ -283,7 +283,7 @@ msgstr "Eingriff" #: analysis/templates/analysis/reports/includes/old_data/amount.html:34 #: compensation/tables.py:224 #: compensation/templates/compensation/detail/eco_account/view.html:19 -#: intervention/forms/modalForms.py:260 intervention/forms/modalForms.py:267 +#: intervention/forms/modalForms.py:275 intervention/forms/modalForms.py:282 #: konova/templates/konova/home.html:88 templates/navbars/navbar.html:34 msgid "Eco-account" msgstr "Ökokonto" @@ -350,7 +350,7 @@ msgstr "Kompensation XY; Flur ABC" #: ema/templates/ema/detail/includes/actions.html:34 #: ema/templates/ema/detail/includes/deadlines.html:34 #: ema/templates/ema/detail/includes/documents.html:31 -#: intervention/forms/forms.py:179 intervention/forms/modalForms.py:133 +#: intervention/forms/forms.py:179 intervention/forms/modalForms.py:148 #: intervention/templates/intervention/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/payments.html:34 #: intervention/templates/intervention/detail/includes/revocation.html:38 @@ -452,7 +452,7 @@ msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" #: compensation/forms/modalForms.py:63 compensation/forms/modalForms.py:274 -#: compensation/forms/modalForms.py:369 intervention/forms/modalForms.py:135 +#: compensation/forms/modalForms.py:369 intervention/forms/modalForms.py:150 #: konova/forms.py:376 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -477,7 +477,7 @@ msgstr "Biotoptyp" msgid "Select the biotope type" msgstr "Biotoptyp wählen" -#: compensation/forms/modalForms.py:155 intervention/forms/modalForms.py:278 +#: compensation/forms/modalForms.py:155 intervention/forms/modalForms.py:293 msgid "in m²" msgstr "" @@ -509,7 +509,7 @@ msgstr "Fristart wählen" #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 #: ema/templates/ema/detail/includes/deadlines.html:31 -#: intervention/forms/modalForms.py:107 +#: intervention/forms/modalForms.py:122 msgid "Date" msgstr "Datum" @@ -888,14 +888,14 @@ msgstr "Zuletzt bearbeitet" #: compensation/templates/compensation/detail/compensation/view.html:79 #: compensation/templates/compensation/detail/eco_account/view.html:82 -#: ema/templates/ema/detail/view.html:69 intervention/forms/modalForms.py:40 +#: ema/templates/ema/detail/view.html:69 intervention/forms/modalForms.py:55 #: intervention/templates/intervention/detail/view.html:116 msgid "Shared with" msgstr "Freigegeben für" #: compensation/templates/compensation/detail/eco_account/includes/controls.html:15 #: ema/templates/ema/detail/includes/controls.html:15 -#: intervention/forms/modalForms.py:54 +#: intervention/forms/modalForms.py:69 #: intervention/templates/intervention/detail/includes/controls.html:15 msgid "Share" msgstr "Freigabe" @@ -1031,7 +1031,7 @@ msgstr "Kompensation {} bearbeitet" #: compensation/views/compensation_views.py:220 #: compensation/views/eco_account_views.py:307 ema/views.py:182 -#: intervention/views.py:476 +#: intervention/views.py:475 msgid "Log" msgstr "Log" @@ -1041,7 +1041,7 @@ msgstr "Kompensation entfernt" #: compensation/views/compensation_views.py:264 #: compensation/views/eco_account_views.py:459 ema/views.py:349 -#: intervention/views.py:130 +#: intervention/views.py:129 msgid "Document added" msgstr "Dokument hinzugefügt" @@ -1087,36 +1087,36 @@ msgid "Deduction removed" msgstr "Abbuchung entfernt" #: compensation/views/eco_account_views.py:328 ema/views.py:262 -#: intervention/views.py:518 +#: intervention/views.py:517 msgid "{} unrecorded" msgstr "{} entzeichnet" #: compensation/views/eco_account_views.py:328 ema/views.py:262 -#: intervention/views.py:518 +#: intervention/views.py:517 msgid "{} recorded" msgstr "{} verzeichnet" -#: compensation/views/eco_account_views.py:529 intervention/views.py:499 +#: compensation/views/eco_account_views.py:529 intervention/views.py:498 msgid "Deduction added" msgstr "Abbuchung hinzugefügt" #: compensation/views/eco_account_views.py:612 ema/views.py:517 -#: intervention/views.py:374 +#: intervention/views.py:373 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" #: compensation/views/eco_account_views.py:617 ema/views.py:522 -#: intervention/views.py:379 +#: intervention/views.py:378 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" #: compensation/views/eco_account_views.py:624 ema/views.py:529 -#: intervention/views.py:386 +#: intervention/views.py:385 msgid "Share link invalid" msgstr "Freigabelink ungültig" #: compensation/views/eco_account_views.py:647 ema/views.py:552 -#: intervention/views.py:409 +#: intervention/views.py:408 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" @@ -1257,46 +1257,57 @@ msgstr "Freigabelink" msgid "Send this link to users who you want to have writing access on the data" msgstr "Andere Nutzer erhalten über diesen Link Zugriff auf die Daten" -#: intervention/forms/modalForms.py:43 +#: intervention/forms/modalForms.py:40 +msgid "Add user to share with" +msgstr "Nutzer direkt hinzufügen" + +#: intervention/forms/modalForms.py:42 +msgid "" +"Multiple selection possible - You can only select users which do not already " +"have access" +msgstr "" +"Mehrfachauswahl möglich - Sie können nur Nutzer wählen, für die der Eintrag noch nicht freigegeben wurde" + +#: intervention/forms/modalForms.py:58 msgid "Remove check to remove access for this user" msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" -#: intervention/forms/modalForms.py:55 +#: intervention/forms/modalForms.py:70 msgid "Share settings for {}" msgstr "Freigabe Einstellungen für {}" -#: intervention/forms/modalForms.py:109 +#: intervention/forms/modalForms.py:124 msgid "Date of revocation" msgstr "Datum des Widerspruchs" -#: intervention/forms/modalForms.py:120 +#: intervention/forms/modalForms.py:135 #: intervention/templates/intervention/detail/includes/revocation.html:35 msgid "Document" msgstr "Dokument" -#: intervention/forms/modalForms.py:123 konova/forms.py:364 +#: intervention/forms/modalForms.py:138 konova/forms.py:364 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" -#: intervention/forms/modalForms.py:147 +#: intervention/forms/modalForms.py:162 #: intervention/templates/intervention/detail/includes/revocation.html:18 msgid "Add revocation" msgstr "Widerspruch hinzufügen" -#: intervention/forms/modalForms.py:189 +#: intervention/forms/modalForms.py:204 msgid "Checked intervention data" msgstr "Eingriffsdaten geprüft" -#: intervention/forms/modalForms.py:195 +#: intervention/forms/modalForms.py:210 msgid "Checked compensations data and payments" msgstr "Kompensationen und Zahlungen geprüft" -#: intervention/forms/modalForms.py:203 +#: intervention/forms/modalForms.py:218 #: intervention/templates/intervention/detail/includes/controls.html:19 msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms/modalForms.py:204 konova/forms.py:449 +#: intervention/forms/modalForms.py:219 konova/forms.py:449 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1304,23 +1315,23 @@ msgstr "" "Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt " "wurden:" -#: intervention/forms/modalForms.py:262 +#: intervention/forms/modalForms.py:277 msgid "Only recorded accounts can be selected for deductions" msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden." -#: intervention/forms/modalForms.py:289 +#: intervention/forms/modalForms.py:304 msgid "Only shared interventions can be selected" msgstr "Nur freigegebene Eingriffe können gewählt werden" -#: intervention/forms/modalForms.py:302 +#: intervention/forms/modalForms.py:317 msgid "New Deduction" msgstr "Neue Abbuchung" -#: intervention/forms/modalForms.py:303 +#: intervention/forms/modalForms.py:318 msgid "Enter the information for a new deduction from a chosen eco-account" msgstr "Geben Sie die Informationen für eine neue Abbuchung ein." -#: intervention/forms/modalForms.py:336 +#: intervention/forms/modalForms.py:351 msgid "" "Eco-account {} is not recorded yet. You can only deduct from recorded " "accounts." @@ -1328,7 +1339,7 @@ msgstr "" "Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von " "verzeichneten Ökokonten erfolgen." -#: intervention/forms/modalForms.py:349 +#: intervention/forms/modalForms.py:364 msgid "" "The account {} has not enough surface for a deduction of {} m². There are " "only {} m² left" @@ -1431,35 +1442,35 @@ msgstr "" "Kein Ausgleich jeglicher Art gefunden (Kompensation, Ersatzzahlung, " "Abbuchung)" -#: intervention/views.py:80 +#: intervention/views.py:79 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:244 +#: intervention/views.py:243 msgid "This intervention has {} revocations" msgstr "Dem Eingriff liegen {} Widersprüche vor" -#: intervention/views.py:292 +#: intervention/views.py:291 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views.py:327 +#: intervention/views.py:326 msgid "{} removed" msgstr "{} entfernt" -#: intervention/views.py:348 +#: intervention/views.py:347 msgid "Revocation removed" msgstr "Widerspruch entfernt" -#: intervention/views.py:430 +#: intervention/views.py:429 msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views.py:452 +#: intervention/views.py:451 msgid "Revocation added" msgstr "Widerspruch hinzugefügt" -#: intervention/views.py:523 +#: intervention/views.py:522 msgid "There are errors on this intervention:" msgstr "Es liegen Fehler in diesem Eingriff vor:" @@ -3141,6 +3152,9 @@ msgstr "" msgid "A fontawesome icon field" msgstr "" +#~ msgid "Share with user" +#~ msgstr "Freigeben für Nutzer" + #~ msgid "Fundings" #~ msgstr "Förderungen"