* Adjust sonar btn display rule for repo page.

This commit is contained in:
caoyanyi
2023-12-19 10:03:14 +08:00
parent 952076f081
commit 9a1858ae4b
+2 -2
View File
@@ -2294,9 +2294,9 @@ class repoModel extends model
{
$action = strtolower($action);
if($action == 'execjob') return common::hasPriv('sonarqube', $action) && !$repo->exec;
if($action == 'reportview') return common::hasPriv('sonarqube', $action) && !$repo->report;
if(!commonModel::hasPriv('repo', $action)) return false;
if($action == 'execjob') return $repo->exec == '';
if($action == 'reportview') return $repo->report == '';
return true;
}