Skip to content

fix(gitlab): allow current-user and global issue reads - #571

Open
codebyArya-bit wants to merge 3 commits into
onecli:mainfrom
codebyArya-bit:fix/gitlab-current-user-permission
Open

codebyArya-bit wants to merge 3 commits into
onecli:mainfrom
codebyArya-bit:fix/gitlab-current-user-permission

Conversation

@codebyArya-bit

Copy link
Copy Markdown

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/issues endpoint is also not covered by the existing issue-read permission.

Fixes #570.

What is the new behavior?

Adds a read-only get_current_user permission for:

GET /api/v4/user

The existing list_issues permission now also covers:

GET /api/v4/issues

The generated gateway catalog has been updated accordingly.

Regression coverage was also added to verify that:

  • GET /api/v4/user is allowed through get_current_user
  • POST /api/v4/user remains blocked
  • GET /api/v4/issues is allowed through list_issues
  • the existing project-level issue endpoint continues to work
  • write requests to the global issues endpoint remain blocked

Additional 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_issues capability rather than adding an unnecessary separate permission.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@codebyArya-bit

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitLab app: no tool covers GET /api/v4/user, so whoami is always blocked even with full access

1 participant