care_fe icon indicating copy to clipboard operation
care_fe copied to clipboard

Restrict Unauthorized Users from Accessing Facility's Patient Registration

Open AshrafMd-1 opened this issue 10 months ago • 17 comments

Proposed Changes

  • Fixes #7244

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • [ ] Add specs that demonstrate bug / test a new feature.
  • [ ] Update product documentation.
  • [ ] Ensure that UI text is kept in I18n files.
  • [ ] Prep screenshot or demo video for changelog entry, and attach it to issue.
  • [ ] Request for Peer Reviews
  • [ ] Completion of QA

AshrafMd-1 avatar Mar 31 '24 06:03 AshrafMd-1

@AshrafMd-1 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 31 '24 06:03 vercel[bot]

Deploy Preview for care-egov-staging ready!

Name Link
Latest commit 5c9682fbedbb95a6895824345cf04027cea7f0bd
Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/664252de9463130008bb8907
Deploy Preview https://deploy-preview-7498--care-egov-staging.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 31 '24 06:03 netlify[bot]

@rithviknishad can you check once

AshrafMd-1 avatar Mar 31 '24 06:03 AshrafMd-1

:wave: Hi, @AshrafMd-1, Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

github-actions[bot] avatar Apr 02 '24 13:04 github-actions[bot]

Deploy Preview for care-net failed.

Name Link
Latest commit 1bd1c435abe5f833e5a98eec11aeb8a025da6c2d
Latest deploy log https://app.netlify.com/sites/care-net/deploys/660c1b3225580100082f0716

netlify[bot] avatar Apr 02 '24 14:04 netlify[bot]

@rithviknishad can you remove the merge conflict

AshrafMd-1 avatar Apr 02 '24 15:04 AshrafMd-1

:wave: Hi, @AshrafMd-1, Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

github-actions[bot] avatar Apr 03 '24 02:04 github-actions[bot]

@AshrafMd-1 fix the lint issue

nihal467 avatar Apr 16 '24 17:04 nihal467

@rithviknishad can you change the labels

AshrafMd-1 avatar Apr 20 '24 09:04 AshrafMd-1

test set for restriction

  • [x] district admin state admin and home nurse are able to create a patient
  • [x] linked doctors and non-home nurse are not able to create a patient
  • [x] verify linked doctors are able to view patient datas

nihal467 avatar Apr 23 '24 10:04 nihal467

image

image

image

  • [ ] When I go to a patient details page under my linked facility and click on the patient detail button, I am redirected to a "page not found" page.
  • [ ] Similarly, if I go to the patient advanced filters, apply the facility filter for my linked facility, then click the "add patient" button, I am redirected to a "page not found" page.

Expected behavior

@AshrafMd-1 when they try to access them, keep them on the same page, and show the error " Oops! Non-Home facility users don't have permission to perform this action."

CC: @rithviknishad @Ashesh3

nihal467 avatar Apr 23 '24 13:04 nihal467

@nihal467 @rithviknishad can you check once if it is okay or are there any shortcomings?

AshrafMd-1 avatar Apr 26 '24 19:04 AshrafMd-1

@rithviknishad can you check once

AshrafMd-1 avatar May 01 '24 09:05 AshrafMd-1

@AshrafMd-1 image

  • [ ] When we click on the add patient button with a nurse user having 1 home facility and multiple linked facility, the error is thrown.

Note: Before marking it again for testing, do a QA test for self-evaluation of the PR

CC: @AshrafMd-1

nihal467 avatar May 08 '24 06:05 nihal467

@nihal467 my bad i did check all those edge cases but forgot to test main case

My exams will be over by tomorrow so by the end of Saturday I will submit a tested pr

AshrafMd-1 avatar May 09 '24 14:05 AshrafMd-1

@AshrafMd-1 Can you update this PR?

gigincg avatar May 13 '24 04:05 gigincg

ready for testing

AshrafMd-1 avatar May 13 '24 07:05 AshrafMd-1

LGTM

nihal467 avatar May 14 '24 14:05 nihal467

@AshrafMd-1 Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:

github-actions[bot] avatar May 14 '24 23:05 github-actions[bot]