#1785 - admins can add/edit phone numbers for all users#3375
Merged
Conversation
…s including area code
This reverts commit 3e795c3. revert back to working point
compwron
reviewed
Apr 16, 2022
| validates :email, presence: true | ||
| validates :display_name, presence: true | ||
|
|
||
| validates_with UserValidator |
Collaborator
There was a problem hiding this comment.
if we're using the fancy validator, should we put all the existing validators in it also and remove them here?
Collaborator
Author
There was a problem hiding this comment.
I think this would be a great issue to create for
compwron
reviewed
Apr 16, 2022
| def update_user_setting? | ||
| if is_supervisor? | ||
| # allow access to own record or volunteer record | ||
| return record == user || record.volunteer? |
Collaborator
There was a problem hiding this comment.
permissions issue- must make sure that the volunteer belongs to the correct casa org
compwron
reviewed
Apr 16, 2022
| before do | ||
| visit edit_casa_admin_path(admin) | ||
| fill_in "Email", with: "newemail@example.com" | ||
| fill_in "Display name", with: "Kadehara Kazuha" |
Collaborator
There was a problem hiding this comment.
Collaborator
Author
There was a problem hiding this comment.
🥳 🥳 guess you found my easter eggs
compwron
reviewed
Apr 16, 2022
|
|
||
| context "with invalid data" do | ||
| let(:role) { "supervisor" } | ||
| let(:supervisor) { create(:supervisor, display_name: "Lesile Knope", casa_org: organization) } |
Collaborator
There was a problem hiding this comment.
compwron
reviewed
Apr 16, 2022
| sign_in admin | ||
| visit edit_volunteer_path(volunteer) | ||
| fill_in "volunteer_email", with: "newemail@example.com" | ||
| fill_in "volunteer_display_name", with: "Kamisato Ayato" |
Collaborator
There was a problem hiding this comment.
compwron
requested changes
Apr 16, 2022
Collaborator
compwron
left a comment
There was a problem hiding this comment.
just need to fix the permissions issue
harsohailB
approved these changes
Apr 16, 2022
compwron
approved these changes
Apr 20, 2022
Collaborator
compwron
left a comment
There was a problem hiding this comment.
This is huge but great!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #1785
What changed, and why?
Front-end: A phone number form field has been added to the edit profiles of admins, supervisors and volunteers.
Back-end: Phone number column added to users table.
How will this affect user permissions?
Admins can have the ability to add/edit phone numbers of other admins, supervisors and volunteers.
How is this tested? (please write tests!) 💖💪
Feelings
Me dealing with Git/merging issues (hence I had to close other PR).
