Skip to content

Commit

Permalink
made vikunja team sync only happen if user active
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed May 30, 2024
1 parent dcc17b3 commit bcc191e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion memberportal/membermatters/constance_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
"MEMBERBUCKS_CURRENCY",
),
),
("Vikunja Integration", ("VIKUNJA_TEAMS")),
("Vikunja Integration", ("VIKUNJA_TEAMS",)),
(
"Trello Integration",
(
Expand Down
12 changes: 8 additions & 4 deletions memberportal/membermatters/oidc_provider_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit bcc191e

Please sign in to comment.