From 614341b32c21f72091d90b91928180e05fa01c4d Mon Sep 17 00:00:00 2001 From: Casey Peel Date: Fri, 8 May 2026 16:28:19 -0700 Subject: [PATCH] Only show clearance lines to authorized users --- pinc/project_quick_check.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pinc/project_quick_check.inc b/pinc/project_quick_check.inc index 68d5c687b6..ba270bf2f3 100644 --- a/pinc/project_quick_check.inc +++ b/pinc/project_quick_check.inc @@ -666,7 +666,11 @@ function _test_project_for_valid_clearance($projectid) $test_name = _("Clearance"); $test_desc = _("This test checks if the project has a clearance in a valid form. This doesn't mean that the clearance itself is good, just that it looks like it could be."); - $details = "

" . _("Clearance Line") . ": " . html_safe($clearance) . "

"; + if ($project->clearance_line_can_be_seen_by_current_user()) { + $details = "

" . _("Clearance Line") . ": " . html_safe($clearance) . "

"; + } else { + $details = "

" . _("You are not authorized to see the clearance line.") . "

"; + } $valid_pattern_1 = '/^20[0-9]{12}[a-z]+\.?$/'; $valid_pattern_2 = '/^gbn[0-9]/';