Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engage75 change user #232

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Engage75 change user #232

wants to merge 4 commits into from

Conversation

jeisenman23
Copy link
Collaborator

No description provided.

@@ -1,4 +1,5 @@
import json
# from ..client.views import common_timezones
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment

@hannamocha
Copy link
Collaborator

These changes don't reflect the mockup, but looking at the user pages again I don't think there's a need to combine the change password page and the user detail page. Seems ideal to keep them separate and I forget the context of that thought process.

Maybe just add the ability for them to edit fist name and last name as well and call it good if James/Tom agree?
https://www.figma.com/design/YMXjpOGObjPVUdsuAJz0EN/Engage-Profile-Page?node-id=0-1&t=iMrWGxAW5WOv7vHt-1

@hannamocha
Copy link
Collaborator

Confirmed with Jordan today, he's going to add first and last name editability to this and make a separate ticket to add email notifications down the line. Keeping the change password page separate.

@jgu2
Copy link
Collaborator

jgu2 commented Dec 10, 2024

Here's what I saw on my local with this PR,

image

What could be updated by the user?

  • First name
  • Last name
  • Organization
  • Email

Be careful about the Email change, as we store Email as username, please refer to the user registration and auth forms to capture the logic - https://github.com/NREL/engage/blob/dev/calliope_app/account/forms.py

So on UI, to change Username to Email. If the email got changed, need to validate the email.

@jeisenman23
Copy link
Collaborator Author

  • Email

Fixed!

@jgu2
Copy link
Collaborator

jgu2 commented Dec 12, 2024

  • Email

Fixed!

@jeisenman23 Did you push your update to the branch? I pulled, but no changes.

@jeisenman23
Copy link
Collaborator Author

  • Email

Fixed!

@jeisenman23 Did you push your update to the branch? I pulled, but no changes.

Oh no, I accidentally pushed my changes to the wrong branch.

@jeisenman23
Copy link
Collaborator Author

  • Email

Fixed!

@jeisenman23 Did you push your update to the branch? I pulled, but no changes.

Oh no, I accidentally pushed my changes to the wrong branch.

Just migrated the changes!

@jgu2
Copy link
Collaborator

jgu2 commented Dec 20, 2024

Thanks for the update. Some other places that I think need update.

1 - Update link text?
image

Change User to Change Profile ?

2 - Prettify the form UI of the page
Current UI form is plain, use bootstrap CSS to prettify the forms.

image

3 - Add Cancel button

As a user, I want to Cancel and return back to previous page.

Add Cancel button along side Save changes button.

4 - Email update error if the email already exists in Engage.

IntegrityError at /en/settings/user/
duplicate key value violates unique constraint "auth_user_username_key"
DETAIL:  Key (username)=(xxxxx@nrel.gov) already exists.

5 - Update some of the logic

I changed my email to a fake one jlkjdafaljda@gmail.com, the update got success.

  • In User model, the username was changed to this email address, but the User.email field value was not. The User.email field value should be updated as well.

  • As we login by using Email field, if this field value got changed, then

  1. send an email with verification link to that email, may add a field email_verified in UserProfile model to indicate if the email is verified or not.

  2. Log the user out, and let the user login again after the user verified the email address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants