From 0fa9762bea6bd66bcc88dd67a5110804ed95d3ae Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 25 Aug 2023 21:36:19 +0200 Subject: [PATCH] auth: do not automatically staff new members --- auth/pipeline.py | 9 --------- spejstore/settings.py | 1 - 2 files changed, 10 deletions(-) diff --git a/auth/pipeline.py b/auth/pipeline.py index 18770a1..889da76 100644 --- a/auth/pipeline.py +++ b/auth/pipeline.py @@ -2,15 +2,6 @@ from social_core.pipeline.social_auth import associate_by_email from django.contrib.auth.models import Group -def staff_me_up(backend, details, response, uid, user, *args, **kwargs): - user.is_staff = True - try: - user.groups.set([Group.objects.get(name="member")]) - except Group.DoesNotExist: - pass - user.save() - - def associate_by_personal_email(backend, details, user=None, *args, **kwargs): return associate_by_email( backend, diff --git a/spejstore/settings.py b/spejstore/settings.py index e1a1090..f3f66c0 100644 --- a/spejstore/settings.py +++ b/spejstore/settings.py @@ -163,7 +163,6 @@ SOCIAL_AUTH_PIPELINE = ( "social_core.pipeline.social_auth.associate_user", "social_core.pipeline.social_auth.load_extra_data", "social_core.pipeline.user.user_details", - "auth.pipeline.staff_me_up", ) # Internationalization