* Fix bug#38087
This commit is contained in:
@@ -287,6 +287,9 @@ $config->openMethods[] = 'gitea.edit';
|
||||
$config->openMethods[] = 'gitea.binduser';
|
||||
$config->openMethods[] = 'jenkins.create';
|
||||
$config->openMethods[] = 'jenkins.edit';
|
||||
$config->openMethods[] = 'instance.createexternalapp';
|
||||
$config->openMethods[] = 'instance.editexternalapp';
|
||||
$config->openMethods[] = 'instance.deleteexternalapp';
|
||||
|
||||
$config->openModules = array();
|
||||
$config->openModules[] = 'install';
|
||||
|
||||
@@ -410,6 +410,8 @@ class instance extends control
|
||||
*/
|
||||
public function createExternalApp(string $type)
|
||||
{
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
|
||||
$this->app->loadModuleConfig('sonarqube');
|
||||
$this->app->loadLang('pipeline');
|
||||
|
||||
@@ -442,6 +444,8 @@ class instance extends control
|
||||
*/
|
||||
public function editExternalApp(int $externalID)
|
||||
{
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
|
||||
$oldApp = $this->loadModel('pipeline')->getByID($externalID);
|
||||
|
||||
if($_POST)
|
||||
@@ -474,6 +478,8 @@ class instance extends control
|
||||
*/
|
||||
public function deleteExternalApp(int $externalID)
|
||||
{
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
|
||||
$oldApp = $this->loadModel('pipeline')->getByID($externalID);
|
||||
$actionID = $this->pipeline->delete($externalID, $oldApp->type);
|
||||
if(!$actionID)
|
||||
|
||||
Reference in New Issue
Block a user