1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Rebase RemoteUserBackend on BaseBackend

This commit is contained in:
Jeremy Stretch
2020-05-27 10:52:59 -04:00
parent 5dddf6846b
commit 4cee506710
2 changed files with 3 additions and 3 deletions

View File

@ -339,7 +339,7 @@ TEMPLATES = [
# Set up authentication backends # Set up authentication backends
AUTHENTICATION_BACKENDS = [ AUTHENTICATION_BACKENDS = [
'utilities.auth_backends.ObjectPermissionBackend', 'utilities.auth_backends.ObjectPermissionBackend',
# REMOTE_AUTH_BACKEND, REMOTE_AUTH_BACKEND,
] ]
# Internationalization # Internationalization

View File

@ -1,7 +1,7 @@
import logging import logging
from django.conf import settings from django.conf import settings
from django.contrib.auth.backends import ModelBackend, RemoteUserBackend as RemoteUserBackend_ from django.contrib.auth.backends import BaseBackend, ModelBackend
from django.contrib.auth.models import Group, Permission from django.contrib.auth.models import Group, Permission
from django.db.models import Q from django.db.models import Q
@ -100,7 +100,7 @@ class ObjectPermissionBackend(ModelBackend):
return model.objects.filter(attrs, pk=obj.pk).exists() return model.objects.filter(attrs, pk=obj.pk).exists()
class RemoteUserBackend(RemoteUserBackend_): class RemoteUserBackend(BaseBackend):
""" """
Custom implementation of Django's RemoteUserBackend which provides configuration hooks for basic customization. Custom implementation of Django's RemoteUserBackend which provides configuration hooks for basic customization.
""" """