mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-12-06 11:57:41 +01:00
Merge branch 'main' into potvieux
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018-2024 by BDE ENS Paris-Saclay
|
||||
# Copyright (C) 2018-2025 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from hashlib import md5
|
||||
@@ -168,6 +168,7 @@ class ActivityInviteView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
activity=activity,
|
||||
first_name="",
|
||||
last_name="",
|
||||
school="",
|
||||
inviter=self.request.user.note,
|
||||
)
|
||||
|
||||
@@ -265,7 +266,6 @@ class ActivityEntryView(LoginRequiredMixin, SingleTableMixin, TemplateView):
|
||||
# Keep only users that have a note
|
||||
note_qs = note_qs.filter(note__noteuser__isnull=False).exclude(note__inactivity_reason='forced')
|
||||
|
||||
|
||||
if activity.activity_type.name != "Pot Vieux":
|
||||
# Keep only members
|
||||
note_qs = note_qs.filter(
|
||||
@@ -339,7 +339,7 @@ class ActivityEntryView(LoginRequiredMixin, SingleTableMixin, TemplateView):
|
||||
context["noteuser_ctype"] = ContentType.objects.get_for_model(NoteUser).pk
|
||||
context["notespecial_ctype"] = ContentType.objects.get_for_model(NoteSpecial).pk
|
||||
|
||||
activities_open = Activity.objects.filter(open=True).filter(
|
||||
activities_open = Activity.objects.filter(open=True, activity_type__manage_entries=True).filter(
|
||||
PermissionBackend.filter_queryset(self.request, Activity, "view")).distinct().all()
|
||||
context["activities_open"] = [a for a in activities_open
|
||||
if PermissionBackend.check_perm(self.request,
|
||||
|
||||
Reference in New Issue
Block a user