We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c120af commit 065ee36Copy full SHA for 065ee36
routers/admin/users.go
@@ -243,7 +243,13 @@ func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) {
243
u.AllowGitHook = form.AllowGitHook
244
u.AllowImportLocal = form.AllowImportLocal
245
u.AllowCreateOrganization = form.AllowCreateOrganization
246
- u.ProhibitLogin = form.ProhibitLogin
+
247
+ // skip slef Prohibit Login
248
+ if ctx.User.ID == u.ID {
249
+ u.ProhibitLogin = false
250
+ } else {
251
+ u.ProhibitLogin = form.ProhibitLogin
252
+ }
253
254
if err := models.UpdateUser(u); err != nil {
255
if models.IsErrEmailAlreadyUsed(err) {
0 commit comments