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

Fix Patient Workflows and Permissions #69

Merged
merged 19 commits into from
May 7, 2023
Merged

Fix Patient Workflows and Permissions #69

merged 19 commits into from
May 7, 2023

Conversation

ramonski
Copy link
Contributor

Description of the issue/feature this PR addresses

☝️ Please merge #68 first

This PR fixes the Patient Workflows to hide the global patent folder and the contained patients from client contact users.

Current behavior before PR

Basically all logged in users could view the global patients folder and select any patient for their samples.

Desired behavior after PR is merged

Patient folder can be only seen by the following roles: LabManager, Manager, LabClerk.
These roles can also create new patients.

If client local patients are enabled, the Owner roles can View/Edit local patients as well.

The ClientGuest role can only view, but not edit shared patients.

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@ramonski ramonski changed the title Patient permissions Permissions Apr 25, 2023
@ramonski ramonski changed the title Permissions Fix Patient Workflows and Permissions Apr 25, 2023
logger.info("Creating new Patient with MRN #: {}".format(mrn))
if patient_api.is_patient_allowed_in_client():
# create the patient in the client
container = patient_api.get_patient_folder()
Copy link
Member

Choose a reason for hiding this comment

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

This should be

# create the patient in the client
container = instance.getClient()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this one! Fixed in 679f9a8

Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks. Just added the @upgradestep decorator for 1408 with 2dae540 . Remember this is important when we touch rolemaps, types and workflows

@xispa xispa merged commit f87db24 into master May 7, 2023
@xispa xispa deleted the patient-permissions branch May 7, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants