mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-20 18:02:52 +00:00
Provide checkbox to override private setting on repo
This commit is contained in:
@@ -328,7 +328,7 @@ func RepoUpdate(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) err
|
|||||||
default:
|
default:
|
||||||
repo.Disabled = len(r.FormValue("Disabled")) == 0
|
repo.Disabled = len(r.FormValue("Disabled")) == 0
|
||||||
repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0
|
repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0
|
||||||
|
repo.Private = len(r.FormValue("Private")) > 0
|
||||||
repo.Privileged = u.Admin && len(r.FormValue("Privileged")) > 0
|
repo.Privileged = u.Admin && len(r.FormValue("Privileged")) > 0
|
||||||
|
|
||||||
// value of "" indicates the currently authenticated user
|
// value of "" indicates the currently authenticated user
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<div class="col-xs-9" role="main">
|
<div class="col-xs-9" role="main">
|
||||||
<div class="alert">Manage your repository settings.</div>
|
<div class="alert">Manage your repository settings.</div>
|
||||||
<form method="POST" action="/{{.Repo.Slug}}" role="form">
|
<form method="POST" action="/{{.Repo.Slug}}" role="form">
|
||||||
<div class="checkbox">
|
<div class="checkbox form-group">
|
||||||
<label>
|
<label>
|
||||||
<input class="" type="checkbox" name="Disabled" {{ if not .Repo.Disabled }}checked="True" {{ end }}/>
|
<input class="" type="checkbox" name="Disabled" {{ if not .Repo.Disabled }}checked="True" {{ end }}/>
|
||||||
Enable Build Hooks
|
Enable Build Hooks
|
||||||
@@ -43,6 +43,12 @@
|
|||||||
Enable Pull Hooks
|
Enable Pull Hooks
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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 }}
|
{{ if .User.Admin }}
|
||||||
<div class="alert alert-min">Admin-only settings.</div>
|
<div class="alert alert-min">Admin-only settings.</div>
|
||||||
<div class="checkbox form-group">
|
<div class="checkbox form-group">
|
||||||
|
Reference in New Issue
Block a user