From 5fcd955a6a12ee77c2e3610708bd67ef07f68f94 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sat, 8 Mar 2014 12:24:36 -0500 Subject: [PATCH] Disable vote & watch links if repository is not accepting ticket updates --- src/main/java/com/gitblit/wicket/pages/TicketPage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java index d3ddc89f..434882f4 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java @@ -520,7 +520,7 @@ public class TicketPage extends TicketBasePage { WicketUtils.setCssClass(votersCount, "badge badge-info"); } add(votersCount); - if (user.isAuthenticated) { + if (user.isAuthenticated && app().tickets().isAcceptingTicketUpdates(repository)) { Model model; if (ticket.isVoter(user.username)) { model = Model.of(getString("gb.removeVote")); @@ -560,7 +560,7 @@ public class TicketPage extends TicketBasePage { WicketUtils.setCssClass(watchersCount, "badge badge-info"); } add(watchersCount); - if (user.isAuthenticated) { + if (user.isAuthenticated && app().tickets().isAcceptingTicketUpdates(repository)) { Model model; if (ticket.isWatching(user.username)) { model = Model.of(getString("gb.stopWatching")); -- 2.39.5