From 7e017c938a6da34e991699060f4c36073a7a86f9 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 8 Aug 2023 16:39:55 +0700 Subject: [PATCH] 11508 review changes, remove extra flag --- docs/administration/authentication/microsoft-azure-ad.md | 1 - netbox/netbox/authentication.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/docs/administration/authentication/microsoft-azure-ad.md b/docs/administration/authentication/microsoft-azure-ad.md index a97c22b2d..1d74aad60 100644 --- a/docs/administration/authentication/microsoft-azure-ad.md +++ b/docs/administration/authentication/microsoft-azure-ad.md @@ -80,7 +80,6 @@ SOCIAL_AUTH_PIPELINE = ( 'social_core.pipeline.user.user_details', 'netbox.authentication.azuread_map_groups', ) -SOCIAL_AUTH_AZUREAD_MAP_GROUP_PERMS = True # Define special user types using groups. Exercise great caution when assigning superuser status. SOCIAL_AUTH_AZUREAD_USER_FLAGS_BY_GROUP = { diff --git a/netbox/netbox/authentication.py b/netbox/netbox/authentication.py index 68e3940e1..ee2ffeb85 100644 --- a/netbox/netbox/authentication.py +++ b/netbox/netbox/authentication.py @@ -397,8 +397,6 @@ def azuread_map_groups(response, user, backend, *args, **kwargs): Also set is_superuser or is_staff based on config map ''' logger = logging.getLogger('netbox.auth.azuread_map_groups') - if not getattr(settings, "SOCIAL_AUTH_AZUREAD_MAP_GROUP_PERMS", False): - return if not hasattr(settings, "SOCIAL_AUTH_AZUREAD_USER_FLAGS_BY_GROUP"): raise ImproperlyConfigured(