From 7807edf552c4c6928b1a2ef6ba4586f42b70a90c Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 30 Apr 2024 12:44:22 -0700 Subject: [PATCH] 15831 monkeypatch LDAP _mirror_group function for NB4 --- netbox/netbox/authentication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/netbox/authentication.py b/netbox/netbox/authentication.py index d8e3a7185..f66a50638 100644 --- a/netbox/netbox/authentication.py +++ b/netbox/netbox/authentication.py @@ -325,6 +325,8 @@ try: permission_filter = permission_filter | Q(groups__name__in=user_obj.ldap_user.group_names) return permission_filter + # Monkey-patch _mirror_groups, code is from django-auth-ldap.backends._LDAPUser + # There are no changes to this routine, the 'fix' is the import of Group above. def _mirror_groups(self): """ Mirrors the user's LDAP groups in the Django database and updates the