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

Prevent users who don't have access to register a patient to a facility from opening the patient registration page of that facility #7244

Closed
rithviknishad opened this issue Feb 21, 2024 · 5 comments · Fixed by #7498
Assignees

Comments

@rithviknishad
Copy link
Member

Describe the bug
Certain user types are not allowed to register a patient into a non-home facility. However, it is frustrating when user fills out the patient form only to realise when submitting that they don't have permission to do this action.

To Reproduce
Steps to reproduce the behavior:

  1. Register a patient to a non home facility as a doctor
  2. Fill the patient registration form and hit submit
  3. See permission denied error

Expected behavior
Users who do not have permission to register a patient to a non-home facility should not be allowed to open patient registration form for that facility.

Screenshots
image

@AshrafMd-1
Copy link
Contributor

I want to work on this issue can you assign me this.

@AshrafMd-1
Copy link
Contributor

@rithviknishad can you specify what users I need to keep the condition on
as of now, I have identified 3

  • Doctor
  • nurse
  • staffdev

@rithviknishad
Copy link
Member Author

Instead of adding a condition, how about fetching only the permitted facilities in the facility select dropdown in the first place?

@AshrafMd-1
Copy link
Contributor

@rithviknishad I have figured out another issue that is if I paste the URL of a non-home facility patient addition page and paste it then it does open the page and has the same issue as above

@rithviknishad
Copy link
Member Author

Just clarified the permissions with @nihal467

  • State Admin has access to create a patient to facilities that belong to their state. (irrespective of their home facility)
  • District Admin has access to create a patient to facilities that belong to their district. (irrespective of their home facility)
  • Users below this user type have access to create patients only in their home facility.

Additional context:

Users will still have access to view existing patient records on all their linked facilities (non-home facilities).

AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Feb 24, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 1, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 8, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 12, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 12, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 18, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 19, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 24, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Mar 29, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 1, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 2, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 3, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 4, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 8, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 10, 2024
nihal467 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 16, 2024
nihal467 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 16, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 16, 2024
nihal467 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 23, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 24, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue Apr 26, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue May 1, 2024
nihal467 added a commit to AshrafMd-1/care_fe that referenced this issue May 7, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue May 13, 2024
AshrafMd-1 added a commit to AshrafMd-1/care_fe that referenced this issue May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants