diff options
author | 赵智超 <1012112796@qq.com> | 2020-04-06 22:23:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 10:23:15 -0400 |
commit | 88c14326b1a5d9216d5f6905dcbe44e43efdb5b3 (patch) | |
tree | ac64fee2e8dca1a7d138399cbf55f1b12ead162b /templates/admin/user/edit.tmpl | |
parent | 1bec60e02afe7c3999f48fa5630031893bd440e8 (diff) | |
download | gitea-88c14326b1a5d9216d5f6905dcbe44e43efdb5b3.tar.gz gitea-88c14326b1a5d9216d5f6905dcbe44e43efdb5b3.zip |
Users should not be able to prohibit their own login (#10970)
* ui: limit managers prohibit themself to login
Because I think it's crazy and not reasonale , that if a user can
prohibit themself to login. so suggest limit this choice on ui
Signed-off-by: a1012112796 <1012112796@qq.com>
* skip self Prohibit Login in post event handle
* fix comment
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/admin/user/edit.tmpl')
-rw-r--r-- | templates/admin/user/edit.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index da75cb5065..feeaacbba2 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -74,7 +74,7 @@ <div class="inline field"> <div class="ui checkbox"> <label><strong>{{.i18n.Tr "admin.users.prohibit_login"}}</strong></label> - <input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}}> + <input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}> </div> </div> <div class="inline field"> |