From bcab895ba146a569bf8469047719337f3ec86b5c Mon Sep 17 00:00:00 2001 From: Casper van der Wel Date: Tue, 14 Nov 2023 16:32:44 +0100 Subject: [PATCH] Clean --- nens_auth_client/checks.py | 2 +- nens_auth_client/conf.py | 1 - nens_auth_client/permissions.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nens_auth_client/checks.py b/nens_auth_client/checks.py index 581b109..b802d4b 100644 --- a/nens_auth_client/checks.py +++ b/nens_auth_client/checks.py @@ -100,7 +100,7 @@ def check_trusted_providers(app_configs=None, **kwargs): trusted = set(settings.TRUSTED_PROVIDERS) trusted_new = set(settings.TRUSTED_PROVIDERS_NEW_USERS) - if not trusted_new.issuperset(trusted): + if not trusted.issuperset(trusted_new): return [ Error("TRUSTED_PROVIDERS must be a superset of TRUSTED_PROVIDERS_NEW_USERS") ] diff --git a/nens_auth_client/conf.py b/nens_auth_client/conf.py index ee4882d..de757f6 100644 --- a/nens_auth_client/conf.py +++ b/nens_auth_client/conf.py @@ -15,7 +15,6 @@ class NensAuthClientAppConf(AppConf): RESOURCE_SERVER_ID = None # For Access Tokens ("aud" should equal this) PERMISSION_BACKEND = "nens_auth_client.permissions.DjangoPermissionBackend" - AUTO_PERMISSIONS = {} # automatic permissions per provider INVITATION_EMAIL_SUBJECT = "Invitation" INVITATION_EXPIRY_DAYS = 14 # change this to change the default expiry diff --git a/nens_auth_client/permissions.py b/nens_auth_client/permissions.py index 89482ee..1ae5a80 100644 --- a/nens_auth_client/permissions.py +++ b/nens_auth_client/permissions.py @@ -92,4 +92,4 @@ def assign_permissions(permissions, user, **kwargs): def auto_assign_permissions(user, claims): backend = get_permission_backend() if hasattr(backend, "auto_assign"): - backend.auto_assign(user, claims) + backend.auto_assign(user=user, claims=claims)