Skip to content

Commit

Permalink
fix: do not setup any git provider for anonymous sessions (#1879)
Browse files Browse the repository at this point in the history
Fixes #1878.
  • Loading branch information
leafty authored May 17, 2024
1 parent 2adec8d commit b0352c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions renku_notebooks/api/classes/data_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def __post_init__(self):
self.renku_url = self.renku_url.rstrip("/")

def get_providers(self, user: User) -> list[GitProvider]:
if user is None or user.access_token is None:
return []
connections = self.get_oauth2_connections(user=user)
providers: dict[str, GitProvider] = dict()
for c in connections:
Expand Down

0 comments on commit b0352c3

Please sign in to comment.