From ae304c64879283a78625fc41f68a97add9f04fc8 Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 11 Jul 2025 13:49:47 +0800 Subject: [PATCH] * [bug#63992] check privilege before display the browseScene tag. --- module/testcase/ui/header.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testcase/ui/header.html.php b/module/testcase/ui/header.html.php index c832834b72..3e086cb7e5 100644 --- a/module/testcase/ui/header.html.php +++ b/module/testcase/ui/header.html.php @@ -41,6 +41,7 @@ $canCreateSuite = $canModify && hasPriv('testsuite', 'create'); $canBrowseUnits = hasPriv('testtask', 'browseunits'); $canBrowseZeroCase = hasPriv('testcase', 'zerocase') && $rawMethod != 'browseunits'; $canBrowseGroupCase = hasPriv('testcase', 'groupcase'); +$canBrowseScene = hasPriv('testcase', 'browseScene') && ($rawMethod == 'browse' || $rawMethod == 'browsescene') && !$isFromDoc; $canAutomation = !$isExecutionApp && $canModify && hasPriv('testcase', 'automation') && !empty($productID) && $rawMethod != 'browseunits'; $canExport = !$isExecutionApp && hasPriv('testcase', 'export'); $canExportTemplate = !$isExecutionApp && hasPriv('testcase', 'exportTemplate'); @@ -213,7 +214,7 @@ featureBar ($rawMethod == 'zerocase' && $pager->recTotal != '') ? span(setClass('label size-sm rounded-full white'), $pager->recTotal) : null, ) ) : null, - !$isFromDoc && ($rawMethod == 'browse' || $rawMethod == 'browsescene') ? li + $canBrowseScene ? li ( set::className('nav-item'), a