1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Provide checkbox to override private setting on repo

This commit is contained in:
Matt Martz 2014-04-02 19:25:40 -05:00
parent dd46fa9563
commit 19ba3e2277
2 changed files with 8 additions and 2 deletions

View File

@ -328,7 +328,7 @@ func RepoUpdate(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) err
default:
repo.Disabled = len(r.FormValue("Disabled")) == 0
repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0
repo.Private = len(r.FormValue("Private")) > 0
repo.Privileged = u.Admin && len(r.FormValue("Privileged")) > 0
// value of "" indicates the currently authenticated user

View File

@ -31,7 +31,7 @@
<div class="col-xs-9" role="main">
<div class="alert">Manage your repository settings.</div>
<form method="POST" action="/{{.Repo.Slug}}" role="form">
<div class="checkbox">
<div class="checkbox form-group">
<label>
<input class="" type="checkbox" name="Disabled" {{ if not .Repo.Disabled }}checked="True" {{ end }}/>
Enable Build Hooks
@ -43,6 +43,12 @@
Enable Pull Hooks
</label>
</div>
<div class="checkbox form-group">
<label>
<input class="" type="checkbox" name="Private" {{ if .Repo.Private }}checked="True" {{ end }}/>
Private
</label>
</div>
{{ if .User.Admin }}
<div class="alert alert-min">Admin-only settings.</div>
<div class="checkbox form-group">