Skip to content

Commit ed2ac90

Browse files
committed
fix
1 parent 6164ff9 commit ed2ac90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/user/setting/account.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func DeleteAccount(ctx *context.Context) {
247247
}
248248

249249
// admin should not delete themself
250-
if ctx.ContextUser.ID == ctx.Doer.ID {
250+
if ctx.Doer.IsAdmin {
251251
ctx.Flash.Error(ctx.Tr("admin.users.cannot_delete_self"))
252252
ctx.Redirect(setting.AppSubURL + "/user/settings/account")
253253
return

0 commit comments

Comments
 (0)