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

collaborators API endpoint does not list team members in a repo owned by an organization #30926

Open
na-Itms opened this issue May 9, 2024 · 0 comments
Labels
topic/api Concerns mainly the API type/bug

Comments

@na-Itms
Copy link

na-Itms commented May 9, 2024

Description

In a repository owned by an organization, when using the API endpoint /repos/ORG/REPO/collaborators, only individual collaborators are listed. The API response should include the list of users who are members of teams assigned to the repository.

This would match the display of the web page ORG/REPO/settings/collaboration, as well as GitHub's API behavior.

This is a severe limitation which prevents me from properly using the Jenkins Gitea plugin (which queries the collaborators API endpoint for trust policy checks). I could in theory circumvent the issue by manually adding individuals to the list of collaborators, but I cannot do that for myself as I am in the Owners group of the organization (thus I receive the error message Cannot add an owner as a collaborator.)

At the very least, repository owners should be listed as collaborators.

I don't seem to be able to create an organization on the test instance, so I can't reproduce the issue there.

Gitea Version

1.21.11

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04

How are you running Gitea?

I used the 1.21.11 linux-amd64 build from dl.gitea.com

Database

MySQL/MariaDB

@yp05327 yp05327 added the topic/api Concerns mainly the API label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/api Concerns mainly the API type/bug
Projects
None yet
Development

No branches or pull requests

2 participants