Skip to content

Commit 2c120af

Browse files
committed
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 <[email protected]>
1 parent b74d30a commit 2c120af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/admin/user/edit.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<div class="inline field">
7575
<div class="ui checkbox">
7676
<label><strong>{{.i18n.Tr "admin.users.prohibit_login"}}</strong></label>
77-
<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}}>
77+
<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}>
7878
</div>
7979
</div>
8080
<div class="inline field">

0 commit comments

Comments
 (0)