diff --git a/memberportal/membermatters/constance_config.py b/memberportal/membermatters/constance_config.py index 7983e030..3957f58c 100644 --- a/memberportal/membermatters/constance_config.py +++ b/memberportal/membermatters/constance_config.py @@ -419,7 +419,7 @@ "MEMBERBUCKS_CURRENCY", ), ), - ("Vikunja Integration", ("VIKUNJA_TEAMS")), + ("Vikunja Integration", ("VIKUNJA_TEAMS",)), ( "Trello Integration", ( diff --git a/memberportal/membermatters/oidc_provider_settings.py b/memberportal/membermatters/oidc_provider_settings.py index 0ef5958c..5e625ce8 100644 --- a/memberportal/membermatters/oidc_provider_settings.py +++ b/memberportal/membermatters/oidc_provider_settings.py @@ -69,10 +69,14 @@ def scope_vikunja_teams(self): if config.VIKUNJA_TEAMS: try: teams = json.loads(config.VIKUNJA_TEAMS) - - return { - "vikunja_groups": teams, - } + if self.user.profile.state == "active": + return { + "vikunja_groups": teams, + } + else: + return { + "vikunja_groups": [], + } except json.JSONDecodeError: logger.error( "VIKUNJA_TEAMS is not a valid JSON object and the Vikunja teams claim wasn't added."