From ae4fdcec92a275baa62173a67f8691f399a91a93 Mon Sep 17 00:00:00 2001 From: Jan Krcmar Date: Tue, 22 Dec 2015 15:06:19 +0100 Subject: [PATCH] added class MyRemoteUserBackend(RemoteUserBackend) giving all authenticated users superuser flag --- accounts/backends.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 accounts/backends.py diff --git a/accounts/backends.py b/accounts/backends.py new file mode 100644 index 0000000..77aa509 --- /dev/null +++ b/accounts/backends.py @@ -0,0 +1,7 @@ +from django.contrib.auth.backends import RemoteUserBackend + +class MyRemoteUserBackend(RemoteUserBackend): + def configure_user(self, user): + user.is_superuser = True + return user +