You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/api/v1
Florin Hillebrand ad6d08d155
Add API to query collaborators permission for a repository (#18761)
Targeting #14936, #15332

Adds a collaborator permissions API endpoint according to GitHub API: https://docs.github.com/en/rest/collaborators/collaborators#get-repository-permissions-for-a-user to retrieve a collaborators permissions for a specific repository.

### Checks the repository permissions of a collaborator. 

`GET` `/repos/{owner}/{repo}/collaborators/{collaborator}/permission`

Possible `permission` values are `admin`, `write`, `read`, `owner`, `none`.

```json
{
  "permission": "admin",
  "role_name": "admin",
  "user": {}
}
```

Where `permission` and `role_name` hold the same `permission` value and `user` is filled with the user API object. Only admins are allowed to use this API endpoint.
3 years ago
..
admin Add Package Registry (#16510) 3 years ago
misc Remove dependent on session auth for api/v1 routers (#19321) 3 years ago
notify Never use /api/v1 from Gitea UI Pages (#19318) 3 years ago
org Fix panic in team repos API (#19431) 3 years ago
packages Add Helm Chart registry (#19406) 3 years ago
repo Add API to query collaborators permission for a repository (#18761) 3 years ago
settings Make mirror feature more configurable (#16957) 3 years ago
swagger Add API to query collaborators permission for a repository (#18761) 3 years ago
user Fix DELETE request for non-existent public key (#19443) 3 years ago
utils Never use /api/v1 from Gitea UI Pages (#19318) 3 years ago
api.go Add API to query collaborators permission for a repository (#18761) 3 years ago
auth.go Let web and API routes have different auth methods group (#19168) 3 years ago
auth_windows.go Let web and API routes have different auth methods group (#19168) 3 years ago