* Add check token codes before import issue.

This commit is contained in:
Guan Xiying
2021-08-25 11:16:36 +08:00
parent 4b63f3021e
commit 0acb0aadce
+5
View File
@@ -257,6 +257,11 @@ class gitlab extends control
$gitlabID = $repo->gitlab;
$projectID = $repo->project;
$gitlab = $this->gitlab->getByID($gitlabID);
$user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
if(!isset($user->is_admin) or !$user->is_admin) die(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
if($_POST)
{
$executionList = $this->post->executionList;