mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-08 02:50:31 +00:00
Add sudo functionality to the API (#4809)
This commit is contained in:
1 parent
6aa712f30f
commit
11413fce75
1 file changed
+4
@@ -73,3 +73,7 @@ using BasicAuth, as follows:
|
|||||||
$ curl --request GET --url https://yourusername:[email protected]/api/v1/users/yourusername/tokens
|
$ curl --request GET --url https://yourusername:[email protected]/api/v1/users/yourusername/tokens
|
||||||
[{"name":"test","sha1":"..."},{"name":"dev","sha1":"..."}]
|
[{"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.
|
||||||
Reference in new issue
Block a user