Admins are superuser

This commit is contained in:
Yohann D'ANELLO 2021-01-21 22:54:23 +01:00
parent 214d422ee2
commit 0da0165ce2
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ class AddOrganizerView(VolunteerMixin, CreateView):
domain=site.domain))
registration.user.email_user(subject, message, html_message=html)
if registration.is_admin:
registration.user.is_superuser = True
registration.user.save()
return ret
def get_success_url(self):