Skip to content

Commit

Permalink
Cleanup documentation about case sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed May 7, 2024
1 parent 19ee9a1 commit d2e8938
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions helm-charts/basehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ jupyterhub:
print("Ignoring allowed_groups check for deployment-service-check")
return original_profile_list
# casefold group names so we can do case insensitive comparisons.
groups = {g.name.casefold() for g in spawner.user.groups}
# If we're using GitHubOAuthenticator, add the user's teams to the groups as well.
Expand All @@ -1039,6 +1040,8 @@ jupyterhub:
print(f"User {spawner.user.name} does not have any auth_state set")
raise web.HTTPError(403)
# casefold teams to match what GitHub's API does when doing authorization calls
groups |= set([f'{team["organization"]["login"]}:{team["slug"]}'.casefold() for team in auth_state["teams"]])
print(f"User {spawner.user.name} is part of groups {' '.join(groups)}")
Expand Down Expand Up @@ -1075,8 +1078,6 @@ jupyterhub:
new_choices[k] = c
po['choices'] = new_choices
# casefold teams so we can do case insensitive comparisons, as github itself is case insensitive (but preserving)
# for orgs and teams
if 'allowed_groups' not in profile:
allowed_profiles.append(profile)
else:
Expand Down

0 comments on commit d2e8938

Please sign in to comment.