-
Notifications
You must be signed in to change notification settings - Fork 4
Regional User Request Access #3440
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
Conversation
- Pulled form elements out of Home component
- Create custom through model - Update serializer to handle new many to many field - Temporary migrations - Update request access patch to include selected regions - Remove unused imports - Update regions info to be a set to ensure no duplicates and easy manipulation
- Updated region checkbox error state to be smarter
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3440 +/- ##
===========================================
- Coverage 91.24% 91.15% -0.09%
===========================================
Files 303 308 +5
Lines 8734 8832 +98
Branches 650 670 +20
===========================================
+ Hits 7969 8051 +82
- Misses 645 654 +9
- Partials 120 127 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
…r is submitting an access request.
- begin removing region refs
- remove region from factory - update logic in tests
- add tests for form logic
@ADPennington , just fixed :) |
@elipe17 @lhuxraft -- @ttran-hub and I will meet tomorrow, 2/11, to test this PR together in the QASP environment. I need to avoid deleting my user account for testing in QASP because it is linked to the vast majority of data file objects tested in this environment. |
@elipe17 @lhuxraft -- @ttran-hub and I completed our testing and below are the findings. Please note that I deleted the test account after every test to model a new user flow as closely as possible. Let us know how best to proceed here. In summary:
test 1. Request access as a central office user user received the correct email language test 2. Request access as a regional office user (one region only) user received the incorrect email language (no evidence of requesting R1 in email but evident in user account) test 3. Request access as a regional office user (more than one region only) user received the incorrect email language (no evidence of requesting multiple regions in email but evident in user account) |
- Update serializer to pass M2M fields to model save to use for email context
…t-tech/TANF-app into 3384-regional-user-workflows
@ADPennington, I added a fix to correctly handle the email context wrt a user being central/regional. You should now be able to request access as central/regional user and get the correct emails. You can also use the same user now without having to delete it from cc. @lhuxraft |
@elipe17 re-tested with a team member who didnt previously have an account in qasp environment. Results below:
|
@@ -52,7 +52,7 @@ def test_create_user_endpoint_not_present(api_client, user_data): | |||
@pytest.mark.django_db | |||
def test_regional_user_update_user_in_region(api_client, regional_user, user_in_region): | |||
"""Test regional staff can update users in their region.""" | |||
assert regional_user.region.id == user_in_region.stt.region.id | |||
assert user_in_region.stt.region in regional_user.regions.all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
during review, I noticed the tests here for regional staff interactions with the user accounts in/out of their region. Its come to my attention that regional user group is currently configured to have visibility into user accounts, and its not just users in their region. These permissions need to be removed before onboarding of regional staff users. Currently no impact. will spin up new ticket, as these permissions were pre-existing @elipe17 @lhuxraft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @elipe17 🚀
As discussed, there will be new tickets for:
- adding region(s) to profile for approved regional staff users
- resolving regional staff permissions re: users before onboarding
Summary of Changes
Pull request closes Update the existing OFA access workflow to include regions #3384
How to Test
RequestAccessForm
from{isAMSUser && (
to{!isAMSUser && (
. Notice the addition of the bang symbol.Deliverables
More details on how deliverables herein are assessed included here.
Deliverable 1: Accepted Features
Checklist of ACs:
Deliverable 2: Tested Code
CodeCov Report
comment in PR)CodeCov Report
comment in PR)Deliverable 3: Properly Styled Code
Deliverable 4: Accessible
iamjolly
andttran-hub
using Accessibility Insights reveal any errors introduced in this PR?Deliverable 5: Deployed
Deliverable 6: Documented
Deliverable 7: Secure
Deliverable 8: User Research
Research product(s) clearly articulate(s):