Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users should not be able to prohibit their own login #10970

Merged
merged 8 commits into from
Apr 6, 2020
Next Next commit
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]>
  • Loading branch information
a1012112796 committed Apr 5, 2020
commit 2c120af604d2b0ac46f21e56f40194134ba631a7
2 changes: 1 addition & 1 deletion templates/admin/user/edit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}>
lafriks marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
<div class="inline field">
Expand Down