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

Ss 643 make an option to edit account details #235

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

anondo1969
Copy link
Contributor

@anondo1969 anondo1969 commented Oct 7, 2024

Description

Reference: SS-643

It should be an option under the Profile dropdown. Users can update their first name, last name, and department. The university and email will be shown but can't be edited. There should be a note on the page saying that to change email or university affiliation, they need to contact [email protected].

Types of changes

new feature

Checklist

If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • This pull request is against develop branch (not applicable for hotfixes)
  • I have included a link to the issue on GitHub or JIRA (if any)
  • I have included migration files (if there are changes to the model classes)
  • I have included, reviewed and executed tests (unit and end2end) to complement my changes
  • I have updated the related documentation (if necessary)
  • I have added a reviewer for this pull request
  • I have added myself as an author for this pull request
  • In the case I have modified settings.py, then I have also updated the studio-settings-configmap.yaml file in serve-charts

Further comments

Anything else you think we should know before merging your code!

@anondo1969 anondo1969 self-assigned this Oct 7, 2024
common/views.py Outdated Show resolved Hide resolved
templates/user/profile.html Outdated Show resolved Hide resolved
templates/user/profile.html Outdated Show resolved Hide resolved
templates/registration/edit_profile.html Outdated Show resolved Hide resolved
templates/registration/edit_profile.html Outdated Show resolved Hide resolved
common/views.py Outdated Show resolved Hide resolved
common/views.py Outdated Show resolved Hide resolved
common/views.py Outdated Show resolved Hide resolved
@anondo1969 anondo1969 marked this pull request as ready for review October 14, 2024 10:46
common/views.py Outdated Show resolved Hide resolved
common/forms.py Outdated Show resolved Hide resolved
common/forms.py Outdated Show resolved Hide resolved
Comment on lines +189 to +203
user_form_details = self.user_edit_form_class(
request.POST,
instance=request.user,
initial={
"email": user_profile_data.user.email,
},
)

profile_form_details = self.profile_edit_form_class(
request.POST,
instance=user_profile_data,
initial={
"affiliation": user_profile_data.affiliation,
},
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make sure, that user cannot pass any other information in the form data.

For instance, that user via direct curl request cannot change their email or password.

]

def __init__(self, *args, **kwargs):
super(ProfileEditForm, self).__init__(*args, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
super(ProfileEditForm, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)

anondo1969 and others added 3 commits October 15, 2024 13:03
removed comments

Co-authored-by: Nikita Churikov <[email protected]>
fixed the gap after hash sign

Co-authored-by: Nikita Churikov <[email protected]>
changed the comment text

Co-authored-by: Nikita Churikov <[email protected]>
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.

4 participants