mirror of
https://github.com/golang/go
synced 2024-11-25 07:17:56 -07:00
misc/dashboard/codereview: add admin-only link to force-update a CL.
R=nigeltao CC=golang-dev https://golang.org/cl/6431055
This commit is contained in:
parent
f979528ce6
commit
a8ce9ab46c
@ -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}}<br /><span style="font-size: smaller;">LGTMs: {{.LGTMHTML}}{{end}}</span>
|
||||
</td>
|
||||
<td title="Last modified">{{.ModifiedAgo}}</td>
|
||||
{{if $.IsAdmin}}<td><a href="/update-cl?cl={{.Number}}" title="Update this CL">⟳</a></td>{{end}}
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user