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

Commit 066f06f

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 8117995 commit 066f06f

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
@@ -41,18 +41,22 @@ def edit
4141
end
4242

4343
def update
44+
msg = "Profile updated successfully!"
45+
4446
success =
4547
if password_update?
4648
succ = current_user.update_with_password(user_params)
47-
bypass_sign_in(current_user) if succ
49+
if succ
50+
bypass_sign_in(current_user)
51+
msg += " Remember to login again on the Docker CLI."
52+
end
4853
succ
4954
else
5055
current_user.update_without_password(params.require(:user).permit(:email, :display_name))
5156
end
5257

5358
if success
54-
redirect_to edit_user_registration_path,
55-
notice: "Profile updated successfully!", float: true
59+
redirect_to edit_user_registration_path, notice: msg, float: true
5660
else
5761
redirect_to edit_user_registration_path,
5862
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)