summaryrefslogtreecommitdiffstats
path: root/routers/admin
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-19 20:11:34 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-19 20:11:34 -0400
commit7ba9257a7ff659417501baf7358216555cebcd86 (patch)
treeffc842cec4165d1069220ae16e08a0b824952f4b /routers/admin
parent6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff)
downloadgitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz
gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip
Add suburl support
Diffstat (limited to 'routers/admin')
-rw-r--r--routers/admin/admin.go2
-rw-r--r--routers/admin/auths.go8
-rw-r--r--routers/admin/users.go8
3 files changed, 9 insertions, 9 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 1fee7adbd5..6f2966bcb4 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -143,7 +143,7 @@ func Dashboard(ctx *middleware.Context) {
} else {
ctx.Flash.Success(success)
}
- ctx.Redirect(setting.AppRootSubUrl + "/admin")
+ ctx.Redirect(setting.AppSubUrl + "/admin")
return
}
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index 9eaae489ae..e537572b41 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -100,7 +100,7 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
}
log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.AuthName)
- ctx.Redirect(setting.AppRootSubUrl + "/admin/auths")
+ ctx.Redirect(setting.AppSubUrl + "/admin/auths")
}
func EditAuthSource(ctx *middleware.Context) {
@@ -181,7 +181,7 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, form.AuthName)
ctx.Flash.Success(ctx.Tr("admin.auths.update_success"))
- ctx.Redirect(setting.AppRootSubUrl + "/admin/auths/" + ctx.Params(":authid"))
+ ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"))
}
func DeleteAuthSource(ctx *middleware.Context) {
@@ -201,12 +201,12 @@ func DeleteAuthSource(ctx *middleware.Context) {
switch err {
case models.ErrAuthenticationUserUsed:
ctx.Flash.Error("form.still_own_user")
- ctx.Redirect(setting.AppRootSubUrl + "/admin/auths/" + ctx.Params(":authid"))
+ ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"))
default:
ctx.Handle(500, "DelLoginSource", err)
}
return
}
log.Trace("Authentication deleted by admin(%s): %s", ctx.User.Name, a.Name)
- ctx.Redirect(setting.AppRootSubUrl + "/admin/auths")
+ ctx.Redirect(setting.AppSubUrl + "/admin/auths")
}
diff --git a/routers/admin/users.go b/routers/admin/users.go
index 5cdb0f5ce9..fc3b0cbce0 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -121,7 +121,7 @@ func NewUserPost(ctx *middleware.Context, form auth.RegisterForm) {
return
}
log.Trace("Account created by admin(%s): %s", ctx.User.Name, u.Name)
- ctx.Redirect(setting.AppRootSubUrl + "/admin/users")
+ ctx.Redirect(setting.AppSubUrl + "/admin/users")
}
func EditUser(ctx *middleware.Context) {
@@ -198,7 +198,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
ctx.Data["User"] = u
ctx.Flash.Success(ctx.Tr("admin.users.update_profile_success"))
- ctx.Redirect(setting.AppRootSubUrl + "/admin/users/" + ctx.Params(":userid"))
+ ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"))
}
func DeleteUser(ctx *middleware.Context) {
@@ -218,12 +218,12 @@ func DeleteUser(ctx *middleware.Context) {
switch err {
case models.ErrUserOwnRepos:
ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo"))
- ctx.Redirect(setting.AppRootSubUrl + "/admin/users/" + ctx.Params(":userid"))
+ ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"))
default:
ctx.Handle(500, "DeleteUser", err)
}
return
}
log.Trace("Account deleted by admin(%s): %s", ctx.User.Name, u.Name)
- ctx.Redirect(setting.AppRootSubUrl + "/admin/users")
+ ctx.Redirect(setting.AppSubUrl + "/admin/users")
}