From 68a04a7286e4c6ad6ec209cef0f9f1d554856e46 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Wed, 5 Apr 2023 19:05:23 +0200 Subject: [PATCH] Show user confirmed_at in admin panel #412 --- messages.pot | 169 +++++++++-------- migrations/versions/421660a4a792_.py | 26 +++ project/forms/admin.py | 5 + project/models/user.py | 3 + project/templates/admin/delete_user.html | 24 +++ project/templates/admin/users.html | 11 +- .../translations/de/LC_MESSAGES/messages.mo | Bin 36733 -> 36986 bytes .../translations/de/LC_MESSAGES/messages.po | 177 ++++++++++-------- .../translations/en/LC_MESSAGES/messages.mo | Bin 4077 -> 4077 bytes .../translations/en/LC_MESSAGES/messages.po | 175 +++++++++-------- project/views/admin.py | 29 ++- tests/views/test_admin.py | 44 +++++ 12 files changed, 430 insertions(+), 233 deletions(-) create mode 100644 migrations/versions/421660a4a792_.py create mode 100644 project/templates/admin/delete_user.html diff --git a/messages.pot b/messages.pot index d1df246..7c648dd 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-04-03 23:59+0200\n" +"POT-Creation-Date: 2023-04-05 18:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -208,7 +208,7 @@ msgstr "" msgid "Legal notice" msgstr "" -#: project/forms/admin.py:13 project/templates/_macros.html:1397 +#: project/forms/admin.py:13 project/templates/_macros.html:1401 #: project/templates/layout.html:302 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:73 project/views/root.py:69 @@ -239,74 +239,88 @@ msgstr "" msgid "Update user" msgstr "" -#: project/forms/admin.py:27 +#: project/forms/admin.py:26 project/templates/admin/delete_user.html:6 +msgid "Delete user" +msgstr "" + +#: project/forms/admin.py:27 project/forms/admin_unit.py:48 +#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23 +#: project/forms/admin_unit_member.py:28 project/forms/event.py:107 +#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27 +#: project/templates/_macros.html:237 project/templates/_macros.html:1497 +#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 +#: project/templates/admin/email.html:66 project/templates/admin/users.html:19 +msgid "Email" +msgstr "" + +#: project/forms/admin.py:32 msgid "Incoming reference requests allowed" msgstr "" -#: project/forms/admin.py:28 +#: project/forms/admin.py:33 msgid "" "If set, other organizations can ask this organization to reference their " "event." msgstr "" -#: project/forms/admin.py:34 +#: project/forms/admin.py:39 msgid "Suggestions enabled" msgstr "" -#: project/forms/admin.py:35 +#: project/forms/admin.py:40 msgid "If set, the organization can work with suggestions." msgstr "" -#: project/forms/admin.py:39 +#: project/forms/admin.py:44 msgid "Create other organizations" msgstr "" -#: project/forms/admin.py:40 +#: project/forms/admin.py:45 msgid "If set, members of the organization can create other organizations." msgstr "" -#: project/forms/admin.py:46 +#: project/forms/admin.py:51 msgid "Invite other organizations" msgstr "" -#: project/forms/admin.py:47 +#: project/forms/admin.py:52 msgid "If set, members of the organization can invite other organizations." msgstr "" -#: project/forms/admin.py:53 +#: project/forms/admin.py:58 msgid "Verify other organizations" msgstr "" -#: project/forms/admin.py:54 +#: project/forms/admin.py:59 msgid "If set, members of the organization can verify other organizations." msgstr "" -#: project/forms/admin.py:59 project/templates/admin/update_admin_unit.html:4 +#: project/forms/admin.py:64 project/templates/admin/update_admin_unit.html:4 #: project/templates/admin/update_admin_unit.html:8 msgid "Update organization" msgstr "" -#: project/forms/admin.py:63 project/forms/admin.py:70 +#: project/forms/admin.py:68 project/forms/admin.py:75 msgid "Recipient" msgstr "" -#: project/forms/admin.py:65 +#: project/forms/admin.py:70 msgid "Send test mail synchronously" msgstr "" -#: project/forms/admin.py:72 project/forms/admin.py:78 +#: project/forms/admin.py:77 project/forms/admin.py:83 msgid "Test recipient" msgstr "" -#: project/forms/admin.py:73 +#: project/forms/admin.py:78 msgid "All users with enabled newsletter setting" msgstr "" -#: project/forms/admin.py:79 +#: project/forms/admin.py:84 msgid "Message" msgstr "" -#: project/forms/admin.py:80 +#: project/forms/admin.py:85 msgid "Send newsletter" msgstr "" @@ -359,7 +373,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1535 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -369,16 +383,6 @@ msgstr "" msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:48 project/forms/admin_unit_member.py:11 -#: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 -#: project/forms/event.py:107 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:237 -#: project/templates/_macros.html:1493 project/templates/admin/admin.html:27 -#: project/templates/admin/email.html:4 project/templates/admin/email.html:66 -#: project/templates/admin/users.html:19 -msgid "Email" -msgstr "" - #: project/forms/admin_unit.py:49 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 #: project/templates/_macros.html:290 @@ -584,16 +588,16 @@ msgstr "" msgid "All-day" msgstr "" -#: project/forms/event.py:54 project/templates/_macros.html:1715 +#: project/forms/event.py:54 project/templates/_macros.html:1719 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "" -#: project/forms/event.py:61 project/templates/_macros.html:1254 +#: project/forms/event.py:61 project/templates/_macros.html:1258 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:67 project/templates/_macros.html:1271 +#: project/forms/event.py:67 project/templates/_macros.html:1275 msgid "An event can last a maximum of 14 days." msgstr "" @@ -803,9 +807,9 @@ msgid "Invalid co-organizer." msgstr "" #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:601 -#: project/templates/event/create.html:284 +#: project/forms/event.py:368 project/forms/event.py:442 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:438 +#: project/templates/_macros.html:601 project/templates/event/create.html:284 #: project/templates/event/update.html:166 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -922,7 +926,7 @@ msgstr "" msgid "Update event" msgstr "" -#: project/forms/event.py:423 project/templates/_macros.html:1226 +#: project/forms/event.py:423 project/templates/_macros.html:1230 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -947,7 +951,7 @@ msgstr "" msgid "Category" msgstr "" -#: project/forms/event.py:442 +#: project/forms/event.py:445 msgid "Find events" msgstr "" @@ -1123,7 +1127,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1409 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1413 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1248,12 +1252,12 @@ msgid "Date" msgstr "" #: project/templates/_macros.html:420 project/templates/_macros.html:579 -#: project/templates/_macros.html:1478 project/templates/event/actions.html:51 +#: project/templates/_macros.html:1482 project/templates/event/actions.html:51 msgid "Share" msgstr "" #: project/templates/_macros.html:424 project/templates/_macros.html:583 -#: project/templates/_macros.html:1508 +#: project/templates/_macros.html:1512 msgid "Add to calendar" msgstr "" @@ -1334,79 +1338,79 @@ msgstr "" msgid "Radius" msgstr "" -#: project/templates/_macros.html:1155 +#: project/templates/_macros.html:1159 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1176 +#: project/templates/_macros.html:1180 msgid "Close" msgstr "" -#: project/templates/_macros.html:1177 +#: project/templates/_macros.html:1181 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1193 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1225 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1229 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1228 project/templates/manage/events.html:66 +#: project/templates/_macros.html:1232 project/templates/manage/events.html:66 msgid "More" msgstr "" -#: project/templates/_macros.html:1275 +#: project/templates/_macros.html:1279 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1303 +#: project/templates/_macros.html:1307 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1369 +#: project/templates/_macros.html:1373 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1517 +#: project/templates/_macros.html:1521 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1519 +#: project/templates/_macros.html:1523 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1524 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1521 +#: project/templates/_macros.html:1525 msgid "Other calendar" msgstr "" -#: project/templates/_macros.html:1716 +#: project/templates/_macros.html:1720 msgid "Remove event date" msgstr "" -#: project/templates/_macros.html:1745 project/templates/event/create.html:176 +#: project/templates/_macros.html:1749 project/templates/event/create.html:176 #: project/templates/event/update.html:99 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "" -#: project/templates/_macros.html:1769 +#: project/templates/_macros.html:1773 msgid "Enter list name" msgstr "" @@ -1600,7 +1604,7 @@ msgid "Users" msgstr "" #: project/templates/admin/admin_units.html:27 -#: project/templates/admin/users.html:27 +#: project/templates/admin/users.html:34 #: project/templates/manage/events.html:60 #: project/templates/manage/members.html:35 #: project/templates/manage/organizers.html:23 @@ -1611,7 +1615,11 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/admin/email.html:47 project/views/admin.py:121 +#: project/templates/admin/delete_user.html:13 +msgid "User" +msgstr "" + +#: project/templates/admin/email.html:47 project/views/admin.py:123 msgid "Mail sent successfully" msgstr "" @@ -1627,6 +1635,17 @@ msgstr "" msgid "Mails sent successfully" msgstr "" +#: project/templates/admin/users.html:35 +#: project/templates/manage/events.html:61 +#: project/templates/manage/members.html:21 +#: project/templates/manage/members.html:36 +#: project/templates/manage/organizers.html:24 +#: project/templates/manage/places.html:28 +#: project/templates/manage/references_incoming.html:21 +#: project/templates/oauth2_client/list.html:35 +msgid "Delete" +msgstr "" + #: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:59 #: project/templates/event/create.html:347 @@ -1927,16 +1946,6 @@ msgstr "" msgid "View" msgstr "" -#: project/templates/manage/events.html:61 -#: project/templates/manage/members.html:21 -#: project/templates/manage/members.html:36 -#: project/templates/manage/organizers.html:24 -#: project/templates/manage/places.html:28 -#: project/templates/manage/references_incoming.html:21 -#: project/templates/oauth2_client/list.html:35 -msgid "Delete" -msgstr "" - #: project/templates/manage/events.html:62 msgid "Duplicate" msgstr "" @@ -2095,29 +2104,37 @@ msgstr "" msgid "Preview" msgstr "" -#: project/views/admin.py:57 +#: project/views/admin.py:59 msgid "Organization successfully updated" msgstr "" -#: project/views/admin.py:81 project/views/manage.py:361 +#: project/views/admin.py:83 project/views/manage.py:371 #: project/views/user.py:28 msgid "Settings successfully updated" msgstr "" -#: project/views/admin.py:110 +#: project/views/admin.py:112 #, python-format msgid "Test mail from %(site_name)s" msgstr "" -#: project/views/admin.py:149 +#: project/views/admin.py:151 #, python-format msgid "Newsletter from %(site_name)s" msgstr "" -#: project/views/admin.py:199 +#: project/views/admin.py:201 msgid "User successfully updated" msgstr "" +#: project/views/admin.py:221 +msgid "Entered email does not match user email" +msgstr "" + +#: project/views/admin.py:226 +msgid "User successfully deleted" +msgstr "" + #: project/views/admin_unit.py:69 msgid "" "Organizations cannot currently be created. The project is in a closed " diff --git a/migrations/versions/421660a4a792_.py b/migrations/versions/421660a4a792_.py new file mode 100644 index 0000000..0df40e1 --- /dev/null +++ b/migrations/versions/421660a4a792_.py @@ -0,0 +1,26 @@ +"""empty message + +Revision ID: 421660a4a792 +Revises: 47c334ba5b86 +Create Date: 2023-04-05 18:09:03.913610 + +""" +import sqlalchemy as sa +import sqlalchemy_utils +from alembic import op + +from project import dbtypes + +# revision identifiers, used by Alembic. +revision = "421660a4a792" +down_revision = "47c334ba5b86" +branch_labels = None +depends_on = None + + +def upgrade(): + op.add_column("user", sa.Column("created_at", sa.DateTime(), nullable=True)) + + +def downgrade(): + op.drop_column("user", "created_at") diff --git a/project/forms/admin.py b/project/forms/admin.py index 2899fa8..758b04f 100644 --- a/project/forms/admin.py +++ b/project/forms/admin.py @@ -22,6 +22,11 @@ class UpdateUserForm(FlaskForm): submit = SubmitField(lazy_gettext("Update user")) +class DeleteUserForm(FlaskForm): + submit = SubmitField(lazy_gettext("Delete user")) + email = EmailField(lazy_gettext("Email"), validators=[DataRequired()]) + + class UpdateAdminUnitForm(FlaskForm): incoming_reference_requests_allowed = BooleanField( lazy_gettext("Incoming reference requests allowed"), diff --git a/project/models/user.py b/project/models/user.py index eeb1dff..ef7c206 100644 --- a/project/models/user.py +++ b/project/models/user.py @@ -1,3 +1,5 @@ +import datetime + from flask_dance.consumer.storage.sqla import OAuthConsumerMixin from flask_security import RoleMixin, UserMixin from sqlalchemy import ( @@ -62,6 +64,7 @@ class User(db.Model, UserMixin): server_default="1", ) ) + created_at = Column(DateTime, default=datetime.datetime.utcnow) def get_user_id(self): return self.id diff --git a/project/templates/admin/delete_user.html b/project/templates/admin/delete_user.html new file mode 100644 index 0000000..394ae40 --- /dev/null +++ b/project/templates/admin/delete_user.html @@ -0,0 +1,24 @@ +{% extends "layout.html" %} +{% from "_macros.html" import render_field_with_errors, render_field %} + +{% block content %} + +

{{ _('Delete user') }} "{{ user.email }}"

+ +
+ {{ form.hidden_tag() }} + +
+
+ {{ _('User') }} +
+
+ {{ render_field_with_errors(form.email) }} +
+
+ + {{ render_field(form.submit) }} + +
+ +{% endblock %} diff --git a/project/templates/admin/users.html b/project/templates/admin/users.html index a3c89db..321e22c 100644 --- a/project/templates/admin/users.html +++ b/project/templates/admin/users.html @@ -17,6 +17,9 @@ {{ _('Email') }} + created_at + confirmed_at + current_login_at @@ -24,7 +27,13 @@ {% for user in users %} {{ user.email }} - {{ _('Edit') }} + {% if user.created_at %}{{ user.created_at | dateformat }}{% endif %} + {% if user.confirmed_at %}{{ user.confirmed_at | dateformat }}{% endif %} + {% if user.current_login_at %}{{ user.current_login_at | dateformat }}{% endif %} + + {{ _('Edit') }} + {{ _('Delete') }} + {% endfor %} diff --git a/project/translations/de/LC_MESSAGES/messages.mo b/project/translations/de/LC_MESSAGES/messages.mo index b606a7d20e89f3cd759bd756bbc980f2d36ad1ca..42ed4aa9ec78c71e4864c0445986a941c14d113e 100644 GIT binary patch delta 8327 zcmYM(3w+P@9>?+TZgyoZ+sw@NA2XM2W-im_wz)fO?i;x`D+Sn}JWdafp5M>+_xs*H-|zP~t9zBczpwZ8eqYYh(T5AhV#L{_1mZ$K@i z3bn?w7|QtOCWR;}{zA<-vY|0?SRbon7B<6Pr~!*n@0DVGoP*7A9S*|}u?Z$LvJ>cy zTJcZ}!*SRZr(g)_#nY%gzk|w9SW{zSumS4* z2T<+1yZU0(0LxJeT!(?U0juE_)VSN5l7Dq@mg8Q3KsXJ@+Fmiff`ePC%`= zC2D{UF3!PV;#>^E0@U*{s6$+Y!8jYW<%_%&^uij{9>3(=j2fs4mD2Z7890i5_$~Iw z)2NlFa{^Ow6wb$Gr~zsv+ja@4xUI80>do!yHum;i&dAkUwS>|6*?DAg19pqze;A&#Ky_G&>fjCcd@t(#Bd7^~j#|hMsPDu@RKL|)+rt}$x*ajC$-hp2BPuk3rp`8~ z!<3DB-UIt$A5_O{T>ZTaU zobegP^dl}r`Z8762`^zHCbhGNun+2aG18~mgqrv%REEx=_WBy~)ixmy*z4E=^N726 zDe#Rk&mrf;>_r`-E2vcZWZF-0m@^fX(md4RoQ%rcQdDMMz&cooI-EP*^N+C>@ztb7K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4`8@6cNyx@M?xH1LVnc*ducOBfQ;PIe>n#;eM QAMX2H*64zJ^Ycpm56J)KUH||9 diff --git a/project/translations/de/LC_MESSAGES/messages.po b/project/translations/de/LC_MESSAGES/messages.po index 5c51c79..765cf5f 100644 --- a/project/translations/de/LC_MESSAGES/messages.po +++ b/project/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-04-03 23:59+0200\n" +"POT-Creation-Date: 2023-04-05 18:46+0200\n" "PO-Revision-Date: 2020-06-07 18:51+0200\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -209,7 +209,7 @@ msgstr "Nutzungsbedingungen" msgid "Legal notice" msgstr "Impressum" -#: project/forms/admin.py:13 project/templates/_macros.html:1397 +#: project/forms/admin.py:13 project/templates/_macros.html:1401 #: project/templates/layout.html:302 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:73 project/views/root.py:69 @@ -240,11 +240,25 @@ msgstr "Rollen" msgid "Update user" msgstr "Nutzer aktualisieren" -#: project/forms/admin.py:27 +#: project/forms/admin.py:26 project/templates/admin/delete_user.html:6 +msgid "Delete user" +msgstr "Nutzer löschen" + +#: project/forms/admin.py:27 project/forms/admin_unit.py:48 +#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23 +#: project/forms/admin_unit_member.py:28 project/forms/event.py:107 +#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27 +#: project/templates/_macros.html:237 project/templates/_macros.html:1497 +#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 +#: project/templates/admin/email.html:66 project/templates/admin/users.html:19 +msgid "Email" +msgstr "Email" + +#: project/forms/admin.py:32 msgid "Incoming reference requests allowed" msgstr "Eingehende Empfehlungsanfragen erlauben" -#: project/forms/admin.py:28 +#: project/forms/admin.py:33 msgid "" "If set, other organizations can ask this organization to reference their " "event." @@ -252,70 +266,70 @@ msgstr "" "Wenn gesetzt, können andere Organisationen diese Organisation bitten, " "deren Veranstaltungen zu empfehlen." -#: project/forms/admin.py:34 +#: project/forms/admin.py:39 msgid "Suggestions enabled" msgstr "Vorschläge aktiv" -#: project/forms/admin.py:35 +#: project/forms/admin.py:40 msgid "If set, the organization can work with suggestions." msgstr "Wenn gesetzt, kann die Organisation mit Vorschlägen arbeiten." -#: project/forms/admin.py:39 +#: project/forms/admin.py:44 msgid "Create other organizations" msgstr "Andere Organisationen erstellen" -#: project/forms/admin.py:40 +#: project/forms/admin.py:45 msgid "If set, members of the organization can create other organizations." msgstr "" "Wenn gesetzt, können Mitglieder der Organisation andere Organisationen " "erstellen." -#: project/forms/admin.py:46 +#: project/forms/admin.py:51 msgid "Invite other organizations" msgstr "Andere Organisationen einladen" -#: project/forms/admin.py:47 +#: project/forms/admin.py:52 msgid "If set, members of the organization can invite other organizations." msgstr "" "Wenn gesetzt, können Mitglieder der Organisation andere Organisationen " "einladen." -#: project/forms/admin.py:53 +#: project/forms/admin.py:58 msgid "Verify other organizations" msgstr "Andere Organisationen verifizieren" -#: project/forms/admin.py:54 +#: project/forms/admin.py:59 msgid "If set, members of the organization can verify other organizations." msgstr "" "Wenn gesetzt, können Mitglieder der Organisation andere Organisationen " "verifizieren." -#: project/forms/admin.py:59 project/templates/admin/update_admin_unit.html:4 +#: project/forms/admin.py:64 project/templates/admin/update_admin_unit.html:4 #: project/templates/admin/update_admin_unit.html:8 msgid "Update organization" msgstr "Organisation aktualisieren" -#: project/forms/admin.py:63 project/forms/admin.py:70 +#: project/forms/admin.py:68 project/forms/admin.py:75 msgid "Recipient" msgstr "Empfänger" -#: project/forms/admin.py:65 +#: project/forms/admin.py:70 msgid "Send test mail synchronously" msgstr "Test-Mail synchron senden" -#: project/forms/admin.py:72 project/forms/admin.py:78 +#: project/forms/admin.py:77 project/forms/admin.py:83 msgid "Test recipient" msgstr "Test-Empfänger" -#: project/forms/admin.py:73 +#: project/forms/admin.py:78 msgid "All users with enabled newsletter setting" msgstr "Alle Nutzer mit aktiviertem Newsletter" -#: project/forms/admin.py:79 +#: project/forms/admin.py:84 msgid "Message" msgstr "Nachricht" -#: project/forms/admin.py:80 +#: project/forms/admin.py:85 msgid "Send newsletter" msgstr "Newsletter senden" @@ -371,7 +385,7 @@ msgstr "" "eindeutig zu identifizieren. Der Kurzname darf nur Buchstaben, Nummern " "und Unterstriche enthalten." -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1535 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539 msgid "Short name must contain only letters numbers or underscore" msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" @@ -381,16 +395,6 @@ msgstr "Der Kurzname darf nur Buchstaben, Nummern und Unterstriche enthalten" msgid "Link URL" msgstr "Link URL" -#: project/forms/admin_unit.py:48 project/forms/admin_unit_member.py:11 -#: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 -#: project/forms/event.py:107 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:237 -#: project/templates/_macros.html:1493 project/templates/admin/admin.html:27 -#: project/templates/admin/email.html:4 project/templates/admin/email.html:66 -#: project/templates/admin/users.html:19 -msgid "Email" -msgstr "Email" - #: project/forms/admin_unit.py:49 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 #: project/templates/_macros.html:290 @@ -607,16 +611,16 @@ msgstr "Gib an, wann der Termin endet. Ein Termin darf maximal 14 Tage dauern." msgid "All-day" msgstr "Ganztägig" -#: project/forms/event.py:54 project/templates/_macros.html:1715 +#: project/forms/event.py:54 project/templates/_macros.html:1719 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "Serientermin" -#: project/forms/event.py:61 project/templates/_macros.html:1254 +#: project/forms/event.py:61 project/templates/_macros.html:1258 msgid "The start must be before the end." msgstr "Der Start muss vor dem Ende sein." -#: project/forms/event.py:67 project/templates/_macros.html:1271 +#: project/forms/event.py:67 project/templates/_macros.html:1275 msgid "An event can last a maximum of 14 days." msgstr "Eine Veranstaltung darf maximal 14 Tage dauern." @@ -843,9 +847,9 @@ msgid "Invalid co-organizer." msgstr "Ungültiger Mitveranstalter." #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:601 -#: project/templates/event/create.html:284 +#: project/forms/event.py:368 project/forms/event.py:442 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:438 +#: project/templates/_macros.html:601 project/templates/event/create.html:284 #: project/templates/event/update.html:166 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -966,7 +970,7 @@ msgstr "Wähle den öffentlichen Status der Veranstaltung." msgid "Update event" msgstr "Veranstaltung aktualisieren" -#: project/forms/event.py:423 project/templates/_macros.html:1226 +#: project/forms/event.py:423 project/templates/_macros.html:1230 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -991,7 +995,7 @@ msgstr "Stichwort" msgid "Category" msgstr "Kategorie" -#: project/forms/event.py:442 +#: project/forms/event.py:445 msgid "Find events" msgstr "Veranstaltungen finden" @@ -1171,7 +1175,7 @@ msgstr "Anfrage speichern" msgid "Delete request" msgstr "Anfrage löschen" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1409 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1413 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1230,7 +1234,11 @@ msgstr "" #: project/forms/security.py:43 msgid "login_confirmation_required" -msgstr "Beachte, dass du deine E-Mail-Adresse bestätigen muss. Dazu wird dir nach der Registrierung eine Bestätigungsanleitung an deine E-Mail-Adresse geschickt. Bitte beachte, dass es einige Minuten dauern kann, bis die Mail bei dir eintrifft. Schaue zur Sicherheit auch im Spam-Ordner nach." +msgstr "" +"Beachte, dass du deine E-Mail-Adresse bestätigen muss. Dazu wird dir nach" +" der Registrierung eine Bestätigungsanleitung an deine E-Mail-Adresse " +"geschickt. Bitte beachte, dass es einige Minuten dauern kann, bis die " +"Mail bei dir eintrifft. Schaue zur Sicherheit auch im Spam-Ordner nach." #: project/forms/security.py:53 msgid "Allow" @@ -1299,12 +1307,12 @@ msgid "Date" msgstr "Datum" #: project/templates/_macros.html:420 project/templates/_macros.html:579 -#: project/templates/_macros.html:1478 project/templates/event/actions.html:51 +#: project/templates/_macros.html:1482 project/templates/event/actions.html:51 msgid "Share" msgstr "Teilen" #: project/templates/_macros.html:424 project/templates/_macros.html:583 -#: project/templates/_macros.html:1508 +#: project/templates/_macros.html:1512 msgid "Add to calendar" msgstr "Zum Kalender" @@ -1387,79 +1395,79 @@ msgstr "Erste" msgid "Radius" msgstr "Umkreis" -#: project/templates/_macros.html:1155 +#: project/templates/_macros.html:1159 msgid "Edit image" msgstr "Bild bearbeiten" -#: project/templates/_macros.html:1176 +#: project/templates/_macros.html:1180 msgid "Close" msgstr "Schließen" -#: project/templates/_macros.html:1177 +#: project/templates/_macros.html:1181 msgid "Okay" msgstr "OK" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1193 msgid "Choose image file" msgstr "Bild-Datei auswählen" -#: project/templates/_macros.html:1225 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1229 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: project/templates/_macros.html:1228 project/templates/manage/events.html:66 +#: project/templates/_macros.html:1232 project/templates/manage/events.html:66 msgid "More" msgstr "Mehr" -#: project/templates/_macros.html:1275 +#: project/templates/_macros.html:1279 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "Bitte gib eine gültige Uhrzeit zwischen 00:00 und 23:59 ein." -#: project/templates/_macros.html:1303 +#: project/templates/_macros.html:1307 #, python-format msgid "Just use %(term)s" msgstr "Verwende einfach %(term)s" -#: project/templates/_macros.html:1369 +#: project/templates/_macros.html:1373 msgid "Event suggestion" msgstr "Veranstaltungsvorschlag" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Link copied" msgstr "Link kopiert" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Copy link" msgstr "Link kopieren" -#: project/templates/_macros.html:1517 +#: project/templates/_macros.html:1521 msgid "Google calendar" msgstr "Google Kalender" -#: project/templates/_macros.html:1519 +#: project/templates/_macros.html:1523 msgid "Apple calendar" msgstr "Apple Kalender" -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1524 msgid "Yahoo calendar" msgstr "Yahoo Kalender" -#: project/templates/_macros.html:1521 +#: project/templates/_macros.html:1525 msgid "Other calendar" msgstr "Anderer Kalender" -#: project/templates/_macros.html:1716 +#: project/templates/_macros.html:1720 msgid "Remove event date" msgstr "Termin entfernen" -#: project/templates/_macros.html:1745 project/templates/event/create.html:176 +#: project/templates/_macros.html:1749 project/templates/event/create.html:176 #: project/templates/event/update.html:99 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "Veranstalter eingeben" -#: project/templates/_macros.html:1769 +#: project/templates/_macros.html:1773 msgid "Enter list name" msgstr "Listenname eingeben" @@ -1650,10 +1658,10 @@ msgstr "OAuth2 Clients" #: project/templates/admin/admin.html:23 project/templates/admin/users.html:4 #: project/templates/admin/users.html:11 msgid "Users" -msgstr "Benutzer" +msgstr "Nutzer" #: project/templates/admin/admin_units.html:27 -#: project/templates/admin/users.html:27 +#: project/templates/admin/users.html:34 #: project/templates/manage/events.html:60 #: project/templates/manage/members.html:35 #: project/templates/manage/organizers.html:23 @@ -1664,7 +1672,11 @@ msgstr "Benutzer" msgid "Edit" msgstr "Bearbeiten" -#: project/templates/admin/email.html:47 project/views/admin.py:121 +#: project/templates/admin/delete_user.html:13 +msgid "User" +msgstr "Nutzer" + +#: project/templates/admin/email.html:47 project/views/admin.py:123 msgid "Mail sent successfully" msgstr "Mail erfolgreich gesendet" @@ -1680,6 +1692,17 @@ msgstr "Test-Mail asynchron senden" msgid "Mails sent successfully" msgstr "Mails erfolgreich gesendet" +#: project/templates/admin/users.html:35 +#: project/templates/manage/events.html:61 +#: project/templates/manage/members.html:21 +#: project/templates/manage/members.html:36 +#: project/templates/manage/organizers.html:24 +#: project/templates/manage/places.html:28 +#: project/templates/manage/references_incoming.html:21 +#: project/templates/oauth2_client/list.html:35 +msgid "Delete" +msgstr "Löschen" + #: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:59 #: project/templates/event/create.html:347 @@ -1989,16 +2012,6 @@ msgstr "Organisation verifizieren" msgid "View" msgstr "Anzeigen" -#: project/templates/manage/events.html:61 -#: project/templates/manage/members.html:21 -#: project/templates/manage/members.html:36 -#: project/templates/manage/organizers.html:24 -#: project/templates/manage/places.html:28 -#: project/templates/manage/references_incoming.html:21 -#: project/templates/oauth2_client/list.html:35 -msgid "Delete" -msgstr "Löschen" - #: project/templates/manage/events.html:62 msgid "Duplicate" msgstr "Duplizieren" @@ -2159,29 +2172,37 @@ msgstr "Optionale Details" msgid "Preview" msgstr "Vorschau" -#: project/views/admin.py:57 +#: project/views/admin.py:59 msgid "Organization successfully updated" msgstr "Organisation erfolgreich aktualisiert" -#: project/views/admin.py:81 project/views/manage.py:361 +#: project/views/admin.py:83 project/views/manage.py:371 #: project/views/user.py:28 msgid "Settings successfully updated" msgstr "Einstellungen erfolgreich aktualisiert" -#: project/views/admin.py:110 +#: project/views/admin.py:112 #, python-format msgid "Test mail from %(site_name)s" msgstr "Test-Mail von %(site_name)s" -#: project/views/admin.py:149 +#: project/views/admin.py:151 #, python-format msgid "Newsletter from %(site_name)s" msgstr "Newsletter von %(site_name)s" -#: project/views/admin.py:199 +#: project/views/admin.py:201 msgid "User successfully updated" msgstr "Nutzer erfolgreich aktualisiert" +#: project/views/admin.py:221 +msgid "Entered email does not match user email" +msgstr "Die eingegebene Email passt nicht zur Email des Nutzers" + +#: project/views/admin.py:226 +msgid "User successfully deleted" +msgstr "Nutzer erfolgreich gelöscht" + #: project/views/admin_unit.py:69 msgid "" "Organizations cannot currently be created. The project is in a closed " diff --git a/project/translations/en/LC_MESSAGES/messages.mo b/project/translations/en/LC_MESSAGES/messages.mo index 73d546718119dd1260261b67970238039c8cc0cc..10b72dde97a0bb0472c5419d6f1d9b425008ead3 100644 GIT binary patch delta 20 ccmaDW|5kp(Yfg4k1w#uf6SK{qIDfMO09Mxr)Bpeg delta 20 ccmaDW|5kp(Yfg4!1tViCQ_IbtIDfMO09LgJ(f|Me diff --git a/project/translations/en/LC_MESSAGES/messages.po b/project/translations/en/LC_MESSAGES/messages.po index bb0c79b..80f3215 100644 --- a/project/translations/en/LC_MESSAGES/messages.po +++ b/project/translations/en/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-04-03 23:59+0200\n" +"POT-Creation-Date: 2023-04-05 18:46+0200\n" "PO-Revision-Date: 2021-04-30 15:04+0200\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -209,7 +209,7 @@ msgstr "" msgid "Legal notice" msgstr "" -#: project/forms/admin.py:13 project/templates/_macros.html:1397 +#: project/forms/admin.py:13 project/templates/_macros.html:1401 #: project/templates/layout.html:302 #: project/templates/widget/event_suggestion/create.html:204 #: project/views/admin_unit.py:73 project/views/root.py:69 @@ -240,74 +240,88 @@ msgstr "" msgid "Update user" msgstr "" -#: project/forms/admin.py:27 +#: project/forms/admin.py:26 project/templates/admin/delete_user.html:6 +msgid "Delete user" +msgstr "" + +#: project/forms/admin.py:27 project/forms/admin_unit.py:48 +#: project/forms/admin_unit_member.py:11 project/forms/admin_unit_member.py:23 +#: project/forms/admin_unit_member.py:28 project/forms/event.py:107 +#: project/forms/event_suggestion.py:38 project/forms/organizer.py:27 +#: project/templates/_macros.html:237 project/templates/_macros.html:1497 +#: project/templates/admin/admin.html:27 project/templates/admin/email.html:4 +#: project/templates/admin/email.html:66 project/templates/admin/users.html:19 +msgid "Email" +msgstr "" + +#: project/forms/admin.py:32 msgid "Incoming reference requests allowed" msgstr "" -#: project/forms/admin.py:28 +#: project/forms/admin.py:33 msgid "" "If set, other organizations can ask this organization to reference their " "event." msgstr "" -#: project/forms/admin.py:34 +#: project/forms/admin.py:39 msgid "Suggestions enabled" msgstr "" -#: project/forms/admin.py:35 +#: project/forms/admin.py:40 msgid "If set, the organization can work with suggestions." msgstr "" -#: project/forms/admin.py:39 +#: project/forms/admin.py:44 msgid "Create other organizations" msgstr "" -#: project/forms/admin.py:40 +#: project/forms/admin.py:45 msgid "If set, members of the organization can create other organizations." msgstr "" -#: project/forms/admin.py:46 +#: project/forms/admin.py:51 msgid "Invite other organizations" msgstr "" -#: project/forms/admin.py:47 +#: project/forms/admin.py:52 msgid "If set, members of the organization can invite other organizations." msgstr "" -#: project/forms/admin.py:53 +#: project/forms/admin.py:58 msgid "Verify other organizations" msgstr "" -#: project/forms/admin.py:54 +#: project/forms/admin.py:59 msgid "If set, members of the organization can verify other organizations." msgstr "" -#: project/forms/admin.py:59 project/templates/admin/update_admin_unit.html:4 +#: project/forms/admin.py:64 project/templates/admin/update_admin_unit.html:4 #: project/templates/admin/update_admin_unit.html:8 msgid "Update organization" msgstr "" -#: project/forms/admin.py:63 project/forms/admin.py:70 +#: project/forms/admin.py:68 project/forms/admin.py:75 msgid "Recipient" msgstr "" -#: project/forms/admin.py:65 +#: project/forms/admin.py:70 msgid "Send test mail synchronously" msgstr "" -#: project/forms/admin.py:72 project/forms/admin.py:78 +#: project/forms/admin.py:77 project/forms/admin.py:83 msgid "Test recipient" msgstr "" -#: project/forms/admin.py:73 +#: project/forms/admin.py:78 msgid "All users with enabled newsletter setting" msgstr "" -#: project/forms/admin.py:79 +#: project/forms/admin.py:84 msgid "Message" msgstr "" -#: project/forms/admin.py:80 +#: project/forms/admin.py:85 msgid "Send newsletter" msgstr "" @@ -360,7 +374,7 @@ msgstr "" msgid "The short name is used to create a unique identifier for your events" msgstr "" -#: project/forms/admin_unit.py:41 project/templates/_macros.html:1535 +#: project/forms/admin_unit.py:41 project/templates/_macros.html:1539 msgid "Short name must contain only letters numbers or underscore" msgstr "" @@ -370,16 +384,6 @@ msgstr "" msgid "Link URL" msgstr "" -#: project/forms/admin_unit.py:48 project/forms/admin_unit_member.py:11 -#: project/forms/admin_unit_member.py:23 project/forms/admin_unit_member.py:28 -#: project/forms/event.py:107 project/forms/event_suggestion.py:38 -#: project/forms/organizer.py:27 project/templates/_macros.html:237 -#: project/templates/_macros.html:1493 project/templates/admin/admin.html:27 -#: project/templates/admin/email.html:4 project/templates/admin/email.html:66 -#: project/templates/admin/users.html:19 -msgid "Email" -msgstr "" - #: project/forms/admin_unit.py:49 project/forms/event.py:108 #: project/forms/event_suggestion.py:31 project/forms/organizer.py:28 #: project/templates/_macros.html:290 @@ -585,16 +589,16 @@ msgstr "" msgid "All-day" msgstr "" -#: project/forms/event.py:54 project/templates/_macros.html:1715 +#: project/forms/event.py:54 project/templates/_macros.html:1719 #: project/templates/widget/event_suggestion/create.html:240 msgid "Recurring event" msgstr "" -#: project/forms/event.py:61 project/templates/_macros.html:1254 +#: project/forms/event.py:61 project/templates/_macros.html:1258 msgid "The start must be before the end." msgstr "" -#: project/forms/event.py:67 project/templates/_macros.html:1271 +#: project/forms/event.py:67 project/templates/_macros.html:1275 msgid "An event can last a maximum of 14 days." msgstr "" @@ -804,9 +808,9 @@ msgid "Invalid co-organizer." msgstr "" #: project/forms/event.py:286 project/forms/event.py:295 -#: project/forms/event.py:368 project/forms/event_suggestion.py:50 -#: project/templates/_macros.html:438 project/templates/_macros.html:601 -#: project/templates/event/create.html:284 +#: project/forms/event.py:368 project/forms/event.py:442 +#: project/forms/event_suggestion.py:50 project/templates/_macros.html:438 +#: project/templates/_macros.html:601 project/templates/event/create.html:284 #: project/templates/event/update.html:166 #: project/templates/event_place/create.html:31 #: project/templates/event_place/delete.html:13 @@ -923,7 +927,7 @@ msgstr "" msgid "Update event" msgstr "" -#: project/forms/event.py:423 project/templates/_macros.html:1226 +#: project/forms/event.py:423 project/templates/_macros.html:1230 #: project/templates/event/actions.html:66 #: project/templates/event/delete.html:6 msgid "Delete event" @@ -948,7 +952,7 @@ msgstr "" msgid "Category" msgstr "" -#: project/forms/event.py:442 +#: project/forms/event.py:445 msgid "Find events" msgstr "" @@ -1124,7 +1128,7 @@ msgstr "" msgid "Delete request" msgstr "" -#: project/forms/reference_request.py:28 project/templates/_macros.html:1409 +#: project/forms/reference_request.py:28 project/templates/_macros.html:1413 #: project/templates/event_suggestion/review_status.html:18 #: project/templates/reference_request/review_status.html:12 msgid "Review status" @@ -1183,7 +1187,11 @@ msgstr "" #: project/forms/security.py:43 msgid "login_confirmation_required" -msgstr "Note that you will need to confirm your email address. Confirmation instructions will be sent to your email address after registration. Please note that it may take a few minutes for the email to reach you. To be on the safe side, also check the spam folder." +msgstr "" +"Note that you will need to confirm your email address. Confirmation " +"instructions will be sent to your email address after registration. " +"Please note that it may take a few minutes for the email to reach you. To" +" be on the safe side, also check the spam folder." #: project/forms/security.py:53 msgid "Allow" @@ -1252,12 +1260,12 @@ msgid "Date" msgstr "" #: project/templates/_macros.html:420 project/templates/_macros.html:579 -#: project/templates/_macros.html:1478 project/templates/event/actions.html:51 +#: project/templates/_macros.html:1482 project/templates/event/actions.html:51 msgid "Share" msgstr "" #: project/templates/_macros.html:424 project/templates/_macros.html:583 -#: project/templates/_macros.html:1508 +#: project/templates/_macros.html:1512 msgid "Add to calendar" msgstr "" @@ -1338,79 +1346,79 @@ msgstr "" msgid "Radius" msgstr "" -#: project/templates/_macros.html:1155 +#: project/templates/_macros.html:1159 msgid "Edit image" msgstr "" -#: project/templates/_macros.html:1176 +#: project/templates/_macros.html:1180 msgid "Close" msgstr "" -#: project/templates/_macros.html:1177 +#: project/templates/_macros.html:1181 msgid "Okay" msgstr "" -#: project/templates/_macros.html:1189 +#: project/templates/_macros.html:1193 msgid "Choose image file" msgstr "" -#: project/templates/_macros.html:1225 project/templates/event/actions.html:65 +#: project/templates/_macros.html:1229 project/templates/event/actions.html:65 #: project/templates/event/delete.html:12 msgid "Edit event" msgstr "" -#: project/templates/_macros.html:1228 project/templates/manage/events.html:66 +#: project/templates/_macros.html:1232 project/templates/manage/events.html:66 msgid "More" msgstr "" -#: project/templates/_macros.html:1275 +#: project/templates/_macros.html:1279 msgid "Please enter a valid time, between 00:00 and 23:59." msgstr "" -#: project/templates/_macros.html:1303 +#: project/templates/_macros.html:1307 #, python-format msgid "Just use %(term)s" msgstr "" -#: project/templates/_macros.html:1369 +#: project/templates/_macros.html:1373 msgid "Event suggestion" msgstr "" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Link copied" msgstr "" -#: project/templates/_macros.html:1487 +#: project/templates/_macros.html:1491 msgid "Copy link" msgstr "" -#: project/templates/_macros.html:1517 +#: project/templates/_macros.html:1521 msgid "Google calendar" msgstr "" -#: project/templates/_macros.html:1519 +#: project/templates/_macros.html:1523 msgid "Apple calendar" msgstr "" -#: project/templates/_macros.html:1520 +#: project/templates/_macros.html:1524 msgid "Yahoo calendar" msgstr "" -#: project/templates/_macros.html:1521 +#: project/templates/_macros.html:1525 msgid "Other calendar" msgstr "" -#: project/templates/_macros.html:1716 +#: project/templates/_macros.html:1720 msgid "Remove event date" msgstr "" -#: project/templates/_macros.html:1745 project/templates/event/create.html:176 +#: project/templates/_macros.html:1749 project/templates/event/create.html:176 #: project/templates/event/update.html:99 #: project/templates/widget/event_suggestion/create.html:129 msgid "Enter organizer" msgstr "" -#: project/templates/_macros.html:1769 +#: project/templates/_macros.html:1773 msgid "Enter list name" msgstr "" @@ -1604,7 +1612,7 @@ msgid "Users" msgstr "" #: project/templates/admin/admin_units.html:27 -#: project/templates/admin/users.html:27 +#: project/templates/admin/users.html:34 #: project/templates/manage/events.html:60 #: project/templates/manage/members.html:35 #: project/templates/manage/organizers.html:23 @@ -1615,7 +1623,11 @@ msgstr "" msgid "Edit" msgstr "" -#: project/templates/admin/email.html:47 project/views/admin.py:121 +#: project/templates/admin/delete_user.html:13 +msgid "User" +msgstr "" + +#: project/templates/admin/email.html:47 project/views/admin.py:123 msgid "Mail sent successfully" msgstr "" @@ -1631,6 +1643,17 @@ msgstr "" msgid "Mails sent successfully" msgstr "" +#: project/templates/admin/users.html:35 +#: project/templates/manage/events.html:61 +#: project/templates/manage/members.html:21 +#: project/templates/manage/members.html:36 +#: project/templates/manage/organizers.html:24 +#: project/templates/manage/places.html:28 +#: project/templates/manage/references_incoming.html:21 +#: project/templates/oauth2_client/list.html:35 +msgid "Delete" +msgstr "" + #: project/templates/admin_unit/create.html:58 #: project/templates/admin_unit/update.html:59 #: project/templates/event/create.html:347 @@ -1931,16 +1954,6 @@ msgstr "" msgid "View" msgstr "" -#: project/templates/manage/events.html:61 -#: project/templates/manage/members.html:21 -#: project/templates/manage/members.html:36 -#: project/templates/manage/organizers.html:24 -#: project/templates/manage/places.html:28 -#: project/templates/manage/references_incoming.html:21 -#: project/templates/oauth2_client/list.html:35 -msgid "Delete" -msgstr "" - #: project/templates/manage/events.html:62 msgid "Duplicate" msgstr "" @@ -2099,29 +2112,37 @@ msgstr "" msgid "Preview" msgstr "" -#: project/views/admin.py:57 +#: project/views/admin.py:59 msgid "Organization successfully updated" msgstr "" -#: project/views/admin.py:81 project/views/manage.py:361 +#: project/views/admin.py:83 project/views/manage.py:371 #: project/views/user.py:28 msgid "Settings successfully updated" msgstr "" -#: project/views/admin.py:110 +#: project/views/admin.py:112 #, python-format msgid "Test mail from %(site_name)s" msgstr "" -#: project/views/admin.py:149 +#: project/views/admin.py:151 #, python-format msgid "Newsletter from %(site_name)s" msgstr "" -#: project/views/admin.py:199 +#: project/views/admin.py:201 msgid "User successfully updated" msgstr "" +#: project/views/admin.py:221 +msgid "Entered email does not match user email" +msgstr "" + +#: project/views/admin.py:226 +msgid "User successfully deleted" +msgstr "" + #: project/views/admin_unit.py:69 msgid "" "Organizations cannot currently be created. The project is in a closed " diff --git a/project/views/admin.py b/project/views/admin.py index e36c89e..c01c395 100644 --- a/project/views/admin.py +++ b/project/views/admin.py @@ -5,12 +5,13 @@ from flask_security import roles_required from sqlalchemy.exc import SQLAlchemyError from sqlalchemy.sql import func -from project import app, celery, db +from project import app, celery, db, user_datastore from project.base_tasks import send_mail_task from project.forms.admin import ( AdminNewsletterForm, AdminSettingsForm, AdminTestEmailForm, + DeleteUserForm, UpdateAdminUnitForm, UpdateUserForm, ) @@ -21,6 +22,7 @@ from project.views.utils import ( flash_errors, get_pagination_urls, handleSqlError, + non_match_for_deletion, send_mail, ) @@ -205,3 +207,28 @@ def admin_user_update(id): form.roles.data = [c.name for c in user.roles] return render_template("admin/update_user.html", user=user, form=form) + + +@app.route("/admin/user//delete", methods=("GET", "POST")) +@roles_required("admin") +def admin_user_delete(id): + user = User.query.get_or_404(id) + + form = DeleteUserForm() + + if form.validate_on_submit(): + if non_match_for_deletion(form.email.data, user.email): + flash(gettext("Entered email does not match user email"), "danger") + else: + try: + user_datastore.delete_user(user) + db.session.commit() + flash(gettext("User successfully deleted"), "success") + return redirect(url_for("admin_users")) + except SQLAlchemyError as e: + db.session.rollback() + flash(handleSqlError(e), "danger") + else: + flash_errors(form) + + return render_template("admin/delete_user.html", form=form, user=user) diff --git a/tests/views/test_admin.py b/tests/views/test_admin.py index 37aec2a..04da2a7 100644 --- a/tests/views/test_admin.py +++ b/tests/views/test_admin.py @@ -150,6 +150,50 @@ def test_admin_user_update(client, seeder, utils, app, mocker, db, db_error): assert any(r.name == "admin" for r in user.roles) +@pytest.mark.parametrize("db_error", [True, False]) +@pytest.mark.parametrize("non_match", [True, False]) +def test_user_delete(client, seeder, utils, app, mocker, db_error, non_match): + user_id, admin_unit_id = seeder.setup_base(True) + other_user_id = seeder.create_user("other@test.de") + + url = utils.get_url("admin_user_delete", id=other_user_id) + response = utils.get_ok(url) + + if db_error: + utils.mock_db_commit(mocker) + + form_email = "other@test.de" + + if non_match: + form_email = "wrong@test.de" + + response = utils.post_form( + url, + response, + { + "email": form_email, + }, + ) + + if non_match: + utils.assert_response_error_message( + response, "Die eingegebene Email passt nicht zur Email des Nutzers" + ) + return + + if db_error: + utils.assert_response_db_error(response) + return + + utils.assert_response_redirect(response, "admin_users") + + with app.app_context(): + from project.models import User + + user = User.query.get(other_user_id) + assert user is None + + @pytest.mark.parametrize("db_error", [True, False]) def test_admin_admin_unit_update(client, seeder, utils, app, mocker, db, db_error): user_id, admin_unit_id = seeder.setup_base(True)