Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GitLab] Improve subgroup support #333

Merged
merged 1 commit into from Feb 4, 2020
Merged

Conversation

akhmerov
Copy link
Contributor

@akhmerov akhmerov commented Feb 4, 2020

When testing the usage of a gitlab subgroup we found two problems:

  • Members with access to the group inherited from the parent one aren't listed in the api endpoint that is currently used
  • Resolving group by name doesn't work if the name contains slashes (all subgroups do).

This fixes both problems.

@akhmerov akhmerov requested a review from minrk February 4, 2020 10:26
@akhmerov
Copy link
Contributor Author

akhmerov commented Feb 4, 2020

Ah, the endpoint is already treated correctly, only the escaping the subgroup is needed. This is a quality of life improvement—in principle users may already provide the numerical group name.

@consideRatio
Copy link
Member

@vindvaki resolved the issue about group inheritance in #283 I believe, and this is now part of the 0.10.0 oauthenticator release. This fix requires GitLab 2.14 and higher.

Regarding group escaping, it makes sense to me. It raised the question of escaping the username also, I found the username currently allow a-Z + 0-9 and . - _ - we don't need to urlescape these I think.

In [1]: from urllib.parse import quote

In [2]: quote("testdot.testdash-testunderscore_okok")                                                                                               
Out[2]: 'testdot.testdash-testunderscore_okok'

This LGTM.

@consideRatio
Copy link
Member

I verified this locally, and this is indeed needed!

@consideRatio consideRatio merged commit 6be6d00 into jupyterhub:master Feb 4, 2020
@consideRatio consideRatio changed the title Improve gitlab subgroup support [GitLab] Improve subgroup support Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants