* Modify root token check.

This commit is contained in:
caoyanyi
2022-01-25 08:23:28 +00:00
parent 3fee6f256d
commit 42c0a2f115
4 changed files with 9 additions and 8 deletions
+2 -1
View File
@@ -471,9 +471,10 @@ class gitlabModel extends model
* @access public
* @return array
*/
public function apiGetCurrentUser($host, $token)
public function apiGetCurrentUser($host, $token, $rootCheck = false)
{
$host = rtrim($host, '/') . "/api/v4%s?private_token=$token";
if($rootCheck) $host .= '&sudo=1';
return $this->apiGet($host, '/user');
}