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 6164ff9 commit ed2ac90Copy full SHA for ed2ac90
routers/web/user/setting/account.go
@@ -247,7 +247,7 @@ func DeleteAccount(ctx *context.Context) {
247
}
248
249
// admin should not delete themself
250
- if ctx.ContextUser.ID == ctx.Doer.ID {
+ if ctx.Doer.IsAdmin {
251
ctx.Flash.Error(ctx.Tr("admin.users.cannot_delete_self"))
252
ctx.Redirect(setting.AppSubURL + "/user/settings/account")
253
return
0 commit comments