summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-03 18:40:52 -0500
committerUnknwon <u@gogs.io>2015-11-03 18:40:52 -0500
commit6f0a41b8b28ba33382ab8d655c0d015324be7647 (patch)
treed30191b529354c42aaf8ae4066d73b402c0b4bb2 /templates
parent25ec20d5251511ebd0b9e6b963e189b860c39704 (diff)
downloadgitea-6f0a41b8b28ba33382ab8d655c0d015324be7647.tar.gz
gitea-6f0a41b8b28ba33382ab8d655c0d015324be7647.zip
#1511 Allow local import only for admin users
Diffstat (limited to 'templates')
-rw-r--r--templates/.VERSION2
-rw-r--r--templates/admin/user/edit.tmpl8
-rw-r--r--templates/repo/settings/navbar.tmpl2
3 files changed, 9 insertions, 3 deletions
diff --git a/templates/.VERSION b/templates/.VERSION
index 815df4fe64..05e36c4634 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.6.23.1103 Beta \ No newline at end of file
+0.6.24.1103 Beta \ No newline at end of file
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index d4e83d6f9d..6f30f05c9f 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -72,7 +72,13 @@
<div class="inline field">
<div class="ui checkbox">
<label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
- <input name="allow_git_hook" type="checkbox" {{if or .User.IsAdmin .User.AllowGitHook}}checked{{end}}>
+ <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.allow_import_local"}}</strong></label>
+ <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}}>
</div>
</div>
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl
index fb2e8c24ab..512ee3002d 100644
--- a/templates/repo/settings/navbar.tmpl
+++ b/templates/repo/settings/navbar.tmpl
@@ -10,7 +10,7 @@
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
{{.i18n.Tr "repo.settings.hooks"}}
</a>
- {{if or .SignedUser.AllowGitHook .SignedUser.IsAdmin}}
+ {{if .SignedUser.CanEditGitHook}}
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
{{.i18n.Tr "repo.settings.githooks"}}
</a>