From: David Symonds Date: Mon, 23 Jul 2012 02:41:23 +0000 (+1000) Subject: misc/dashboard/codereview: add admin-only link to force-update a CL. X-Git-Tag: go1.1rc2~2785 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a8ce9ab46ca4302d7e33c3734610f4b680b52e72;p=gostls13.git misc/dashboard/codereview: add admin-only link to force-update a CL. R=nigeltao CC=golang-dev https://golang.org/cl/6431055 --- diff --git a/misc/dashboard/codereview/dashboard/front.go b/misc/dashboard/codereview/dashboard/front.go index 21d4d3cda9..791a1000c2 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}}