Skip to content

Commit 87314f2

Browse files
author
AJ ONeal
committed
properly label account recovery instead of reset password
1 parent 44f943e commit 87314f2

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

models/mail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func SendActivateAccountMail(c *macaron.Context, u *User) {
7373

7474
// SendResetPasswordMail sends a password reset mail to the user
7575
func SendResetPasswordMail(c *macaron.Context, u *User) {
76-
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "reset password")
76+
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "recover account")
7777
}
7878

7979
// SendActivateEmailMail sends confirmation email to confirm new email address

options/locale/locale_en-US.ini

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ sign_up_successful = Account was successfully created.
206206
confirmation_mail_sent_prompt = A new confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the registration process.
207207
must_change_password = Update your password
208208
allow_password_change = Require user to change password (recommended)
209-
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the password reset process.
209+
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the account recovery process.
210210
active_your_account = Activate Your Account
211211
account_activated = Account has been activated
212212
prohibit_login = Sign In Prohibited
@@ -215,11 +215,11 @@ resent_limit_prompt = You have already requested an activation email recently. P
215215
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
216216
resend_mail = Click here to resend your activation email
217217
email_not_associate = The email address is not associated with any account.
218-
send_reset_mail = Click here to resend your password reset email
219-
reset_password = Reset Your Password
218+
send_reset_mail = Click here to resend your account recovery email
219+
reset_password = Account Recovery
220220
invalid_code = Your confirmation code is invalid or has expired.
221-
reset_password_helper = Reset Password
222-
reset_password_wrong_user = You are signed in as %s, but the password reset link is for %s
221+
reset_password_helper = Recover Account
222+
reset_password_wrong_user = You are signed in as %s, but the account recovery link is for %s
223223
password_too_short = Password length cannot be less than %d characters.
224224
non_local_account = Non-local users can not update their password through the Gitea web interface.
225225
verify = Verify
@@ -242,7 +242,7 @@ openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new
242242
openid_register_title = Create new account
243243
openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here.
244244
openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry.
245-
disable_forgot_password_mail = Password reset is disabled. Please contact your site administrator.
245+
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
246246
email_domain_blacklisted = You cannot register with your email address.
247247
authorize_application = Authorize Application
248248
authroize_redirect_notice = You will be redirected to %s if you authorize this application.
@@ -251,11 +251,12 @@ authorize_application_description = If you grant the access, it will be able to
251251
authorize_title = Authorize "%s" to access your account?
252252
authorization_failed = Authorization failed
253253
authorization_failed_desc = The authorization failed because we detected an invalid request. Please contact the maintainer of the app you've tried to authorize.
254+
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
254255

255256
[mail]
256257
activate_account = Please activate your account
257258
activate_email = Verify your email address
258-
reset_password = Reset your password
259+
reset_password = Recover your account
259260
register_success = Registration successful
260261
register_notify = Welcome to Gitea
261262

@@ -1682,7 +1683,7 @@ config.mail_notify = Enable Email Notifications
16821683
config.disable_key_size_check = Disable Minimum Key Size Check
16831684
config.enable_captcha = Enable CAPTCHA
16841685
config.active_code_lives = Active Code Lives
1685-
config.reset_password_code_lives = Reset Password Code Expiry Time
1686+
config.reset_password_code_lives = Recover Account Code Expiry Time
16861687
config.default_keep_email_private = Hide Email Addresses by Default
16871688
config.default_allow_create_organization = Allow Creation of Organizations by Default
16881689
config.enable_timetracking = Enable Time Tracking

routers/routes/routes.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,6 @@ func RegisterRoutes(m *macaron.Macaron) {
253253
m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
254254

255255
// ***** START: User *****
256-
m.Group("/user", func() {
257-
m.Get("/reset_password", user.ResetPasswd)
258-
m.Post("/reset_password", user.ResetPasswdPost)
259-
})
260256
m.Group("/user", func() {
261257
m.Get("/login", user.SignIn)
262258
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
@@ -383,6 +379,8 @@ func RegisterRoutes(m *macaron.Macaron) {
383379
m.Any("/activate", user.Activate, reqSignIn)
384380
m.Any("/activate_email", user.ActivateEmail)
385381
m.Get("/email2user", user.Email2User)
382+
m.Get("/recover_account", user.ResetPasswd)
383+
m.Post("/recover_account", user.ResetPasswdPost)
386384
m.Get("/forgot_password", user.ForgotPasswd)
387385
m.Post("/forgot_password", user.ForgotPasswdPost)
388386
m.Get("/logout", user.SignOut)

routers/user/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ func commonResetPassword(ctx *context.Context) *models.User {
12111211
return u
12121212
}
12131213

1214-
// ResetPasswd render the reset password page
1214+
// ResetPasswd render the account recovery page
12151215
func ResetPasswd(ctx *context.Context) {
12161216
ctx.Data["IsResetForm"] = true
12171217

@@ -1220,7 +1220,7 @@ func ResetPasswd(ctx *context.Context) {
12201220
ctx.HTML(200, tplResetPassword)
12211221
}
12221222

1223-
// ResetPasswdPost response from reset password request
1223+
// ResetPasswdPost response from account recovery request
12241224
func ResetPasswdPost(ctx *context.Context) {
12251225
u := commonResetPassword(ctx)
12261226

templates/mail/auth/reset_passwd.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<p>Hi <b>{{.DisplayName}}</b>,</p>
1010
<p>Please click the following link to reset your password within <b>{{.ResetPwdCodeLives}}</b>:</p>
11-
<p><a href="{{AppUrl}}user/reset_password?code={{.Code}}">{{AppUrl}}user/reset_password?code={{.Code}}</a></p>
11+
<p><a href="{{AppUrl}}user/recover_account?code={{.Code}}">{{AppUrl}}user/recover_account?code={{.Code}}</a></p>
1212
<p>Not working? Try copying and pasting it to your browser.</p>
1313
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
1414
</body>

0 commit comments

Comments
 (0)