Browse Source

Fix "Tests" appearing twice for staff

Alan Lam 1 năm trước cách đây
mục cha
commit
2f25978c82
1 tập tin đã thay đổi với 4 bổ sung và 1 xóa
  1. 4 1
      controllers/account.php

+ 4 - 1
controllers/account.php

@@ -164,7 +164,10 @@ if($user->canAccessReports()) {
 
 
 if($user->canAccessTestResults()) {
 if($user->canAccessTestResults()) {
 	$icons[] = new AccountIcon(__("Test Results"), "/account/test-results", "clipboard-list-check");
 	$icons[] = new AccountIcon(__("Test Results"), "/account/test-results", "clipboard-list-check");
-	$icons[] = new AccountIcon(__("Tests"), "/account/tests", "clipboard-check");
+
+	if($user->isCustomer()) {
+		$icons[] = new AccountIcon(__("Tests"), "/account/tests", "clipboard-check");
+	}
 }
 }
 
 
 if($user->canAccessTests()) {
 if($user->canAccessTests()) {