1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/routers/api/v1/swagger
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.
2022-04-29 14:24:38 +02:00
..
app.go Swagger AccessToken fixes (#16574) 2021-08-01 16:44:15 -04:00
cron.go
issue.go Add API to get issue/pull comments and events (timeline) (#17403) 2022-01-01 22:12:25 +08:00
key.go
misc.go
nodeinfo.go Add nodeinfo endpoint for federation purposes (#16953) 2021-09-28 01:38:06 +02:00
notify.go
options.go Add API to get/edit wiki (#17278) 2021-10-25 11:43:40 +08:00
org.go [API] Add endpount to get user org permissions (#17232) 2021-10-12 12:47:19 +02:00
package.go Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
repo.go Add API to query collaborators permission for a repository (#18761) 2022-04-29 14:24:38 +02:00
settings.go Expose Attachemnt Settings by API (#12514) 2020-09-05 08:43:06 +01:00
user.go [API] GET / SET User Settings (#16169) 2021-06-23 15:58:44 -04:00