From a8ce9ab46ca4302d7e33c3734610f4b680b52e72 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 23 Jul 2012 12:41:23 +1000 Subject: [PATCH] misc/dashboard/codereview: add admin-only link to force-update a CL. R=nigeltao CC=golang-dev https://golang.org/cl/6431055 --- misc/dashboard/codereview/dashboard/front.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/dashboard/codereview/dashboard/front.go b/misc/dashboard/codereview/dashboard/front.go index 21d4d3cda95..791a1000c23 100644 --- a/misc/dashboard/codereview/dashboard/front.go +++ b/misc/dashboard/codereview/dashboard/front.go @@ -30,6 +30,7 @@ func handleFront(w http.ResponseWriter, r *http.Request) { data := &frontPageData{ Reviewers: personList, User: user.Current(c).Email, + IsAdmin: user.IsAdmin(c), } var currentPerson string currentPerson, data.UserIsReviewer = emailToPerson[data.User] @@ -136,6 +137,7 @@ type frontPageData struct { UserIsReviewer bool User, LogoutURL string + IsAdmin bool } type clTable struct { @@ -245,6 +247,7 @@ var frontPage = template.Must(template.New("front").Funcs(template.FuncMap{ {{if and .LGTMs $tbl.Assignable}}
LGTMs: {{.LGTMHTML}}{{end}} {{.ModifiedAgo}} + {{if $.IsAdmin}}{{end}} {{end}}