Merge branch 'jihu' of https://gitlab.zcorp.cc/easycorp/zentaopms into jihu
This commit is contained in:
@@ -207,6 +207,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function webhook()
|
||||
{
|
||||
$this->gitlab->webhookCheckToken();
|
||||
$product = $this->get->product;
|
||||
$gitlab = $this->get->gitlab;
|
||||
$project = $this->get->project;
|
||||
|
||||
@@ -728,6 +728,18 @@ class gitlabModel extends model
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* webhook check token.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function webhookCheckToken()
|
||||
{
|
||||
$gitlab = $this->getByID($this->get->gitlab);
|
||||
if($gitlab->private != $this->get->token) die();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse webhook body function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user