Repository navigation
fix(gitlab): allow current-user and global issue reads - #571
Open
codebyArya-bit wants to merge 3 commits into
Open
codebyArya-bit wants to merge 3 commits into
codebyArya-bit wants to merge 3 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have read the [CONTRIBUTING.md](https://github.com/onecli/onecli/blob/main/CONTRIBUTING.md) file.
YES
What kind of change does this PR introduce?
Bug fix.
What is the current behavior?
The GitLab permission catalog does not include a read tool for
GET /api/v4/user.GitLab clients commonly call this endpoint during startup to verify the authenticated user/token. Because the endpoint is not represented in the catalog, the request falls through to the connection grant's default block even when the GitLab connection otherwise has full read access.
The global
GET /api/v4/issuesendpoint is also not covered by the existing issue-read permission.Fixes #570.
What is the new behavior?
Adds a read-only
get_current_userpermission for:GET /api/v4/userThe existing
list_issuespermission now also covers:GET /api/v4/issuesThe generated gateway catalog has been updated accordingly.
Regression coverage was also added to verify that:
GET /api/v4/useris allowed throughget_current_userPOST /api/v4/userremains blockedGET /api/v4/issuesis allowed throughlist_issuesAdditional context
This keeps the change limited to read access and does not broaden GitLab write permissions.
The global issues endpoint is treated as another route for the existing
list_issuescapability rather than adding an unnecessary separate permission.