mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 13:04:08 +02:00
Move user/org deletion to services (#17673)
This commit is contained in:
1 parent
55be5fe339
commit
f34151bdb2
24 files changed
+382
-301
No files matched your search
@@ -26,6 +26,7 @@ import (
|
||||
router_user_setting "code.gitea.io/gitea/routers/web/user/setting"
|
||||
"code.gitea.io/gitea/services/forms"
|
||||
"code.gitea.io/gitea/services/mailer"
|
||||
"code.gitea.io/gitea/services/user"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -377,7 +378,7 @@ func DeleteUser(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if err = models.DeleteUser(u); err != nil {
|
||||
if err = user.DeleteUser(u); err != nil {
|
||||
switch {
|
||||
case models.IsErrUserOwnRepos(err):
|
||||
ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo"))
|
||||
|
||||
Reference in new issue
Block a user