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

Getting repository collaborators permissions #15332

Closed
2 of 6 tasks
flozzone opened this issue Apr 7, 2021 · 1 comment
Closed
2 of 6 tasks

Getting repository collaborators permissions #15332

flozzone opened this issue Apr 7, 2021 · 1 comment
Labels
issue/duplicate The issue has already been reported. modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@flozzone
Copy link
Contributor

flozzone commented Apr 7, 2021

  • Gitea version (or commit ref): 1.13.3
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No

Description

Background

For a CI system (gitea, jenkins, k8s) I am creating K8s namespaces based on PRs of a repostory. In these namespaces the application is built and deployed and tested automatically. A user of the CI system should be able to access the PRs namespace for debugging or to change configurations. Such a user needs the appropriate permissions in a namespace in order to view or change something. Currently only the owner of a PR gets access to its namespace by querying the PR via API. We also have situations where a namespace is created for a specific branch (no PRs). But since there is no PR to get the user from, I would like to give repository collaborators with write access to the generated namespace.

But actually the API doesn't provide the needed information (or at least I couldn't find it). When querying GET /repos/{owner}/{repo}/collaborators the usual User model is returned. It contains the is_admin property, but it seems this is related to global Gitea administrators.

Proposal

Would it be possible to introduce a new Model Collaborator inheriting from User which contains a property permission which is either set to view, write or admin?

Currently only the endpoint GET /repos/{owner}/{repo}/collaborators is returning collaborators and would be the only one affected by that change.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Apr 8, 2021
@techknowlogick techknowlogick added the modifies/api This PR adds API routes or modifies them label Apr 9, 2021
@qwerty287
Copy link
Contributor

Duplicate of #14936?

@lunny lunny added the issue/duplicate The issue has already been reported. label Oct 27, 2021
@lunny lunny closed this as completed Oct 27, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants