From 61ef158f76a464e3bcd356dd55f4c10868aab134 Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 14 Feb 2017 09:38:58 +0100 Subject: [PATCH] Don't show review panel if user doesn't have track changes --- .../review-panel/controllers/ReviewPanelController.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee index d46ef404bc..5cdf7c672c 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -41,6 +41,11 @@ define [ $scope.$watch "ui.pdfLayout", (layout) -> $scope.reviewPanel.layoutToLeft = (layout == "flat") + + $scope.$watch "project.features.trackChangesVisible", (visible) -> + return if !visible? + if !visible + $scope.ui.reviewPanelOpen = false $scope.commentState = adding: false