This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Add min_access_level to GitLab groups query#46480
Merged
Conversation
Contributor
|
❌ Problem: the label |
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff e06b1cc...1a5b237.
|
mrnugget
approved these changes
Jan 16, 2023
| } | ||
|
|
||
| url := fmt.Sprintf("groups?per_page=100&page=%d", page) | ||
| url := fmt.Sprintf("groups?per_page=100&page=%d&min_access_level=10", page) |
Contributor
There was a problem hiding this comment.
What if the user is in more than 100 groups? We have no pagination?
Contributor
Author
There was a problem hiding this comment.
There is page=%d in there.
Just about all of our clients depend on the caller to paginate through the list
Contributor
There was a problem hiding this comment.
🤦♂️ Ugh, you're right. Sorry!
kopancek
approved these changes
Jan 16, 2023
DaedalusG
added a commit
that referenced
this pull request
Jan 16, 2023
pjlast
pushed a commit
that referenced
this pull request
Jan 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When checking if a user belongs to a GitLab group to restrict signup, we hit the /groups endpoint and check whether any of the returned groups are in that endpoint.
However, this endpoint returns all visible groups. Just because a group is visible to a user does not imply the user is a member of that group.
We need to add
min_access_level=10to the query, so that the user has to, at minimum, be a guest on the group.Test plan
Manual verification