From 0b46db62c969fbdc4d64bd1e1ef2b5993b295ede Mon Sep 17 00:00:00 2001 From: Luke Hollis Date: Sat, 13 Mar 2021 20:14:36 -0800 Subject: [PATCH] on signup, user is assigned to Public group and cannot access admin backend --- giza/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/giza/views.py b/giza/views.py index 5e5ee77..07b471e 100644 --- a/giza/views.py +++ b/giza/views.py @@ -215,6 +215,8 @@ def sign_up(request): if custom_user_form.is_valid(): # create user custom_user = custom_user_form.save() + public_group = Group.objects.get(name='Public') + custom_user.groups.add(public_group) custom_user.save() registered = True return redirect('/')