aboutsummaryrefslogtreecommitdiff
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/admin/users.go3
-rw-r--r--routers/user/setting.go3
2 files changed, 6 insertions, 0 deletions
diff --git a/routers/admin/users.go b/routers/admin/users.go
index 35104453..ac33fd62 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -220,6 +220,9 @@ func DeleteUser(ctx *middleware.Context) {
case models.ErrUserOwnRepos:
ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo"))
ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"))
+ case models.ErrUserHasOrgs:
+ ctx.Flash.Error(ctx.Tr("admin.users.still_has_org"))
+ ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"))
default:
ctx.Handle(500, "DeleteUser", err)
}
diff --git a/routers/user/setting.go b/routers/user/setting.go
index 74a3113a..bb0fa910 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -311,6 +311,9 @@ func SettingsDelete(ctx *middleware.Context) {
case models.ErrUserOwnRepos:
ctx.Flash.Error(ctx.Tr("form.still_own_repo"))
ctx.Redirect(setting.AppSubUrl + "/user/settings/delete")
+ case models.ErrUserHasOrgs:
+ ctx.Flash.Error(ctx.Tr("form.still_has_org"))
+ ctx.Redirect(setting.AppSubUrl + "/user/settings/delete")
default:
ctx.Handle(500, "DeleteUser", err)
}