* Hide devops search for no devops module.

This commit is contained in:
caoyanyi
2023-11-17 17:16:07 +08:00
parent 6f999b279b
commit adfd07abc0
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -1341,6 +1341,12 @@ class commonModel extends model
$searchObjects = $lang->searchObjects;
if($config->systemMode == 'light') unset($searchObjects['program']);
if(!helper::hasFeature('devops'))
{
if(isset($searchObjects['deploy'])) unset($searchObjects['deploy']);
if(isset($searchObjects['service'])) unset($searchObjects['service']);
if(isset($searchObjects['deploystep'])) unset($searchObjects['deploystep']);
}
foreach($searchObjects as $key => $value)
{
+1
View File
@@ -362,6 +362,7 @@ class search extends control
{
if(!isset($this->lang->search->modules[$objectType])) continue;
if($this->config->systemMode == 'light' and $objectType == 'program') continue;
if(!helper::hasFeature('devops') && in_array($objectType, array('deploy', 'service', 'deploystep'))) continue;
$typeList[$objectType] = $this->lang->search->modules[$objectType];
}