summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthias Beckert <beckert.matthias@googlemail.com>2019-04-11 10:32:42 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-04-11 16:32:42 +0800
commit5348573fdf88d2d9261ede567c137c151ae0d2e2 (patch)
tree65eaed05a21677a34a84bf9d2b458fefd1917c5c /templates
parent66fa092cc8a8e62f7b224b2d7ea67c764564f22f (diff)
downloadgitea-5348573fdf88d2d9261ede567c137c151ae0d2e2.tar.gz
gitea-5348573fdf88d2d9261ede567c137c151ae0d2e2.zip
Allow admin users to set a repositoires visibility to public, even if FORCE_PRIVATE is to true (#6541) (#6572)
Signed-off-by: Matthias Beckert <beckert.matthias@googlemail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/options.tmpl4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 94fbcbe651..7e25206c9d 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -19,7 +19,11 @@
<div class="inline field">
<label>{{.i18n.Tr "repo.visibility"}}</label>
<div class="ui checkbox">
+ {{if .IsAdmin}}
+ <input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
+ {{else}}
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}{{if and $.ForcePrivate .Repository.IsPrivate}} readonly{{end}}>
+ {{end}}
<label>{{.i18n.Tr "repo.visibility_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visibility_fork_helper"}}</span>{{end}}</label>
</div>
</div>