From fbc964ded507363d1e98ee45d24a9a3c0ca70d60 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Tue, 31 Jul 2018 12:02:27 +0100 Subject: [PATCH] Make sure that oauth users are staff --- opentech/apply/users/pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opentech/apply/users/pipeline.py b/opentech/apply/users/pipeline.py index bab1c3ec2..3df8f198e 100644 --- a/opentech/apply/users/pipeline.py +++ b/opentech/apply/users/pipeline.py @@ -9,3 +9,5 @@ def make_otf_staff(backend, user, response, *args, **kwargs): if email_domain in settings.STAFF_EMAIL_DOMAINS: staff_group = Group.objects.get(name=STAFF_GROUP_NAME) user.groups.add(staff_group) + # Required in order to allow access to django admin, no other functional use + user.is_staff = True -- GitLab