File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -323,9 +323,10 @@ function initTopMenu(&$db)
323323 foreach ($ guiTopMenu as $ element )
324324 {
325325 // check if Test Plan is available
326+ $ testPlanID = (isset ($ _SESSION ['testplanID ' ]) && $ _SESSION ['testplanID ' ] > 0 ) ? $ _SESSION ['testplanID ' ] : null ;
326327 if ((!isset ($ element ['condition ' ])) || ($ element ['condition ' ] == '' ) ||
327328 (($ element ['condition ' ] == 'TestPlanAvailable ' ) &&
328- isset ( $ _SESSION [ ' testplanID ' ]) && $ _SESSION [ ' testplanID ' ] > 0 ) ||
329+ ! is_null ( $ testPlanID ) ) ||
329330 (($ element ['condition ' ] == 'ReqMgmtEnabled ' ) &&
330331 isset ($ _SESSION ['testprojectOptions ' ]->requirementsEnabled ) &&
331332 $ _SESSION ['testprojectOptions ' ]->requirementsEnabled ))
@@ -339,15 +340,15 @@ function initTopMenu(&$db)
339340 {
340341 foreach ($ element ['right ' ] as $ rg )
341342 {
342- if ( $ addItem = (has_rights ($ db ,$ rg ) == "yes " ) )
343+ if ( $ addItem = (has_rights ($ db ,$ rg, $ _SESSION [ ' testprojectID ' ], $ testPlanID ) == "yes " ) )
343344 {
344345 break ;
345346 }
346347 }
347348 }
348349 else
349350 {
350- $ addItem = (has_rights ($ db ,$ element ['right ' ]) == "yes " );
351+ $ addItem = (has_rights ($ db ,$ element ['right ' ], $ _SESSION [ ' testprojectID ' ], $ testPlanID ) == "yes " );
351352 }
352353 }
353354
You can’t perform that action at this time.
0 commit comments