From 0acb0aadce6f9a69cdf583fa1989f6f5dda1e456 Mon Sep 17 00:00:00 2001 From: Guan Xiying Date: Wed, 25 Aug 2021 11:16:36 +0800 Subject: [PATCH] * Add check token codes before import issue. --- module/gitlab/control.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 082b881d9e..e2fddc7cee 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -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;