]> source.dussan.org Git - gitea.git/commit
Redirect on changed user and org name (#11649)
authorAndrew Bezold <andrew.bezold@gmail.com>
Sun, 24 Jan 2021 15:23:05 +0000 (10:23 -0500)
committerGitHub <noreply@github.com>
Sun, 24 Jan 2021 15:23:05 +0000 (16:23 +0100)
commitbc05ddc0ebd6fdc826ef2beec99304bac60ddd8a
tree03d52e07feedd37e169a04980f9efbb8bd1aca65
parent4f608ad31f538cb45411ff9a2238db812b5ca414
Redirect on changed user and org name (#11649)

* Add redirect for user

* Add redirect for orgs

* Add user redirect test

* Appease linter

* Add comment to DeleteUserRedirect function

* Fix locale changes

* Fix GetUserByParams

* Fix orgAssignment

* Remove debug logging

* Add redirect prompt

* Dont Export DeleteUserRedirect & only use it within a session

* Unexport newUserRedirect

* cleanup

* Fix & Dedub API code

* Format Template

* Add Migration & rm dublicat

* Refactor: unexport newRepoRedirect() & rm dedub del exec

* if this fails we'll need to re-rename the user directory

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
25 files changed:
models/error.go
models/fixtures/user_redirect.yml [new file with mode: 0644]
models/migrations/migrations.go
models/migrations/v167.go [new file with mode: 0644]
models/models.go
models/org.go
models/repo.go
models/repo_redirect.go
models/repo_redirect_test.go
models/user.go
models/user_redirect.go [new file with mode: 0644]
models/user_redirect_test.go [new file with mode: 0644]
modules/context/context.go
modules/context/org.go
modules/context/repo.go
options/locale/locale_en-US.ini
routers/api/v1/api.go
routers/api/v1/user/helper.go [new file with mode: 0644]
routers/api/v1/user/key.go
routers/api/v1/user/user.go
routers/repo/http.go
routers/user/profile.go
templates/org/settings/options.tmpl
templates/user/settings/profile.tmpl
web_src/js/index.js