Skip to content

Commit e9ac23c

Browse files
committed
Use AppSubUrl for more redirections
Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template Fixes /explore and organisation redirection
1 parent dbd9d8d commit e9ac23c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

modules/context/org.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
6363

6464
// Force redirection when username is actually a user.
6565
if !org.IsOrganization() {
66-
ctx.Redirect("/" + org.Name)
66+
ctx.Redirect(setting.AppSubURL + "/" + org.Name)
6767
return
6868
}
6969

options/locale/locale_en-US.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.op
259259
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
260260
email_domain_blacklisted = You cannot register with your email address.
261261
authorize_application = Authorize Application
262-
authroize_redirect_notice = You will be redirected to %s if you authorize this application.
262+
authorize_redirect_notice = You will be redirected to %s if you authorize this application.
263263
authorize_application_created_by = This application was created by %s.
264264
authorize_application_description = If you grant the access, it will be able to access and write to all your account information, including private repos and organisations.
265265
authorize_title = Authorize "%s" to access your account?

routers/home.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func ExploreOrganizations(ctx *context.Context) {
273273
// ExploreCode render explore code page
274274
func ExploreCode(ctx *context.Context) {
275275
if !setting.Indexer.RepoIndexerEnabled {
276-
ctx.Redirect("/explore", 302)
276+
ctx.Redirect(setting.AppSubURL+"/explore", 302)
277277
return
278278
}
279279

templates/user/auth/grant.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
</p>
1414
</div>
1515
<div class="ui attached segment">
16-
<p>{{.i18n.Tr "auth.authroize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
16+
<p>{{.i18n.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
1717
</div>
1818
<div class="ui attached segment">
19-
<form method="post" action="{{.AppSubUrl}}/login/oauth/grant">
19+
<form method="post" action="{{AppSubUrl}}/login/oauth/grant">
2020
{{.CsrfTokenHtml}}
2121
<input type="hidden" name="client_id" value="{{.Application.ClientID}}">
2222
<input type="hidden" name="state" value="{{.State}}">

0 commit comments

Comments
 (0)