From 11413fce757a73f81815ad06f41e9db5e412dade Mon Sep 17 00:00:00 2001 From: zeripath Date: Fri, 7 Sep 2018 04:31:29 +0100 Subject: [PATCH] Add sudo functionality to the API (#4809) --- doc/advanced/api-usage.en-us.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/advanced/api-usage.en-us.md b/doc/advanced/api-usage.en-us.md index f04a99f1..369bae6c 100644 --- a/doc/advanced/api-usage.en-us.md +++ b/doc/advanced/api-usage.en-us.md @@ -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.