Add sudo functionality to the API (#4809)
This commit is contained in:
parent
e6a03813d4
commit
d293a2b9d6
4 changed files with 95 additions and 1 deletions
|
@ -73,3 +73,7 @@ using BasicAuth, as follows:
|
|||
$ curl --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens
|
||||
[{"name":"test","sha1":"..."},{"name":"dev","sha1":"..."}]
|
||||
```
|
||||
|
||||
## Sudo
|
||||
|
||||
The API allows admin users to sudo API requests as another user. Simply add either a `sudo=` parameter or `Sudo:` request header with the username of the user to sudo.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue