* Adjust priv of devops.
This commit is contained in:
@@ -20,7 +20,8 @@ class gitea extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
if(!commonModel::hasPriv('instance', 'manage')) $this->loadModel('common')->deny('instance', 'manage', false);
|
||||
|
||||
/* This is essential when changing tab(menu) from gitea to repo. */
|
||||
/* Optional: common::setMenuVars('devops', $this->session->repoID); */
|
||||
if($this->app->rawMethod != 'binduser') $this->loadModel('ci')->setMenu();
|
||||
|
||||
@@ -21,6 +21,11 @@ class gitlab extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
|
||||
if(!in_array($methodName, array('browseproject', 'browsegroup', 'managegroupmembers', 'browseuser', 'browsebranch', 'manageprojectmembers', 'managebranchpriv', 'managetagpriv', '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); */
|
||||
$this->loadModel('ci')->setMenu();
|
||||
|
||||
@@ -20,7 +20,7 @@ class gogs extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
if(!commonModel::hasPriv('instance', 'manage')) $this->loadModel('common')->deny('instance', 'manage', false);
|
||||
/* This is essential when changing tab(menu) from gogs to repo. */
|
||||
/* Optional: common::setMenuVars('devops', $this->session->repoID); */
|
||||
if($this->app->rawMethod != 'binduser') $this->loadModel('ci')->setMenu();
|
||||
|
||||
@@ -21,6 +21,11 @@ class sonarqube extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
if(!commonModel::hasPriv('space', 'browse')) $this->loadModel('common')->deny('space', 'browse', false);
|
||||
|
||||
if(!in_array($methodName, array('browseproject', 'reportview', 'browseissue')))
|
||||
{
|
||||
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); */
|
||||
$this->loadModel('ci')->setMenu();
|
||||
|
||||
Reference in New Issue
Block a user