Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 6484507

Browse files
committed
Remind users to login again after password update
Upon password update, users should `docker login` again, otherwise push/pull command will fail. Signed-off-by: Miquel Sabaté Solà <[email protected]>
1 parent 7823be5 commit 6484507

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

app/controllers/auth/registrations_controller.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,22 @@ def edit
5151
end
5252

5353
def update
54+
msg = "Profile updated successfully!"
55+
5456
success =
5557
if password_update?
5658
succ = current_user.update_with_password(user_params)
57-
bypass_sign_in(current_user) if succ
59+
if succ
60+
bypass_sign_in(current_user)
61+
msg += " Remember to login again on the Docker CLI."
62+
end
5863
succ
5964
else
6065
current_user.update_without_password(params.require(:user).permit(:email, :display_name))
6166
end
6267

6368
if success
64-
redirect_to edit_user_registration_path,
65-
notice: "Profile updated successfully!", float: true
69+
redirect_to edit_user_registration_path, notice: msg, float: true
6670
else
6771
redirect_to edit_user_registration_path,
6872
alert: resource.errors.full_messages, float: true

config/locales/devise.en.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ en:
3434
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
3535
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
3636
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
37-
updated: "Your password has been changed successfully. You are now signed in."
38-
updated_not_active: "Your password has been changed successfully."
37+
updated: "Your password has been changed successfully. You are now signed in. Remember to login again on the Docker CLI."
38+
updated_not_active: "Your password has been changed successfully. Remember to login again on the Docker CLI."
3939
registrations:
4040
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
4141
signed_up: "Welcome! You have signed up successfully."

0 commit comments

Comments
 (0)