* Add empty option of install devops app.

This commit is contained in:
zhaoke
2023-09-27 17:19:01 +08:00
parent 35312dd07e
commit 87f2bfb26d
8 changed files with 24 additions and 13 deletions
+7 -4
View File
@@ -20,11 +20,14 @@ class gitlab extends control
{
parent::__construct($moduleName, $methodName);
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
if(!in_array(strtolower(strtolower($this->methodName)), array('browseproject', 'browsegroup', 'browseuser', 'browsebranch', 'browsetag')))
if(stripos($this->methodName, 'ajax') === false)
{
if(!commonModel::hasPriv('instance', 'manage')) $this->loadModel('common')->deny('instance', 'manage', false);
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
if(!in_array(strtolower(strtolower($this->methodName)), array('browseproject', 'browsegroup', 'browseuser', 'browsebranch', 'browsetag')))
{
if(!commonModel::hasPriv('instance', 'manage')) $this->loadModel('common')->deny('instance', 'manage', false);
}
}
/* This is essential when changing tab(menu) from gitlab to repo. */
/* Optional: common::setMenuVars('devops', $this->session->repoID); */