From d9fbd5564eec9bd714665d0c6dcbf6c1dec4626c Mon Sep 17 00:00:00 2001 From: ynerant Date: Sat, 6 Feb 2021 19:26:19 +0100 Subject: [PATCH] Volunteers can add organizers --- apps/registration/views.py | 4 ++-- tfjm/templates/base.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index 9f08202..7b30630 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -25,7 +25,7 @@ from django_tables2 import SingleTableView from magic import Magic from participation.models import Passage, Solution, Synthesis, Tournament from tfjm.tokens import email_validation_token -from tfjm.views import AdminMixin, UserMixin, UserRegistrationMixin, VolunteerMixin +from tfjm.views import UserMixin, UserRegistrationMixin, VolunteerMixin from .forms import AddOrganizerForm, AdminRegistrationForm, CoachRegistrationForm, HealthSheetForm, \ ParentalAuthorizationForm, PaymentForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm, \ @@ -254,7 +254,7 @@ class UserDetailView(LoginRequiredMixin, DetailView): return context -class UserListView(AdminMixin, SingleTableView): +class UserListView(VolunteerMixin, SingleTableView): """ Display the list of all registered users. """ diff --git a/tfjm/templates/base.html b/tfjm/templates/base.html index b42fdcd..85c2744 100644 --- a/tfjm/templates/base.html +++ b/tfjm/templates/base.html @@ -60,7 +60,7 @@ {% trans "Tournaments" %} - {% if user.is_authenticated and user.registration.is_admin %} + {% if user.is_authenticated and user.registration.is_volunteer %}