mirror of
https://github.com/avency/Gitea.git
synced 2025-10-29 02:34:59 +01:00
feat: Run API call as another user
This commit is contained in:
@ -88,6 +88,16 @@ class Client
|
||||
return $this->httpClient->request($method, $uri, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $username
|
||||
* @return $this
|
||||
*/
|
||||
public function sudo(string $username): self
|
||||
{
|
||||
$this->config['query']['sudo'] = $username;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $authentication
|
||||
* @throws Exception
|
||||
|
||||
Reference in New Issue
Block a user