summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-10 19:02:57 -0500
committerUnknwon <u@gogs.io>2015-12-10 19:02:57 -0500
commit3d5d61778ac8fab981720b5f8b7fe75e2fb58434 (patch)
treed22e52c2cc8ad9fb948322252a594225cf1b71b2 /templates/user
parentddcc8d998c93d6e252319a82b116dbe553a919ad (diff)
downloadgitea-3d5d61778ac8fab981720b5f8b7fe75e2fb58434.tar.gz
gitea-3d5d61778ac8fab981720b5f8b7fe75e2fb58434.zip
#1938 #1374 disable password change for non-local users
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/password.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/user/settings/password.tmpl b/templates/user/settings/password.tmpl
index e29e807e96..644f4f9316 100644
--- a/templates/user/settings/password.tmpl
+++ b/templates/user/settings/password.tmpl
@@ -9,6 +9,7 @@
{{.i18n.Tr "settings.change_password"}}
</h4>
<div class="ui attached segment">
+ {{if .SignedUser.IsLocal}}
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_OldPassword}}error{{end}}">
@@ -28,6 +29,11 @@
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
</div>
</form>
+ {{else}}
+ <div class="ui info message">
+ <p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
+ </div>
+ {{end}}
</div>
</div>
</div>