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 analysis_workflow permissions for Field Analysis Results #293

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
<permission-role>RegulatoryInspector</permission-role>
<permission-role>Sampler</permission-role>
Copy link
Member

Choose a reason for hiding this comment

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

Sampler mustn't be allowed to see the results set in the lab. His/her work is only about the results in the field. If there are personnel in the lab that works both as samplers and analysts, then both roles should be applied to those users

</permission-map>
</state>

Expand All @@ -52,9 +53,9 @@
<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
</permission-map>
<permission-map name="BIKA: Edit Field Results" acquired="True">
<permission-map name="BIKA: Edit Field Results" acquired="False">
</permission-map>
<permission-map name="BIKA: Edit Results" acquired="True">
<permission-map name="BIKA: Edit Results" acquired="False">
</permission-map>
<permission-map name="BIKA: View Results" acquired="False">
<permission-role>Analyst</permission-role>
Expand Down Expand Up @@ -116,12 +117,12 @@
<permission-role>Owner</permission-role>
</permission-map>
<permission-map name="BIKA: Edit Field Results" acquired="False">
<permission-role>Analyst</permission-role>
Copy link
Member

Choose a reason for hiding this comment

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

IMO, no one except Sampler should be allowed to edit field results

<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
<permission-role>LabClerk</permission-role>
<permission-role>Sampler</permission-role>
</permission-map>
<permission-map name="BIKA: Edit Results" acquired="True">
</permission-map>
<permission-map name="BIKA: Edit Results" acquired="False">
</permission-map>
<permission-map name="BIKA: Receive Sample" acquired="True">
<permission-role>LabClerk</permission-role>
Expand Down Expand Up @@ -150,7 +151,11 @@
<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
</permission-map>
<permission-map name="BIKA: Edit Field Results" acquired="True">
<permission-map name="BIKA: Edit Field Results" acquired="False">
<permission-role>Analyst</permission-role>
<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
<permission-role>Sampler</permission-role>
Copy link
Member

Choose a reason for hiding this comment

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

Assuming that sample is received after the sample collection has taken place and the field results must be entered during the collecting process, no one should be able to edit those "field results" (except Sampler and Labman) once a Sample has been received.

</permission-map>
<permission-map name="BIKA: Edit Results" acquired="False">
<permission-role>Analyst</permission-role>
Expand Down Expand Up @@ -187,7 +192,7 @@
<permission-role>Manager</permission-role>
</permission-map>
<permission-map name="BIKA: Edit Field Results" acquired="False">
<permission-role>LabClerk</permission-role>
<permission-role>Analyst</permission-role>
Copy link
Member

Choose a reason for hiding this comment

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

In my opinion, an Analyst shouldn't never be able to modify Field results, I think this is a task that must concern to the Sampler only. If we were strict, the scope of work of an Analyst regarding to results introduction should be limited to those analyses performed inside the lab and ideally, only for those to which has been assigned through a Worksheet. Is the responsability of the labman to plan the work and assign the tasks to the available resources.

Note to_be_preserved state is reached before the sample is received (not yet available by personnel from inside the lab). See diagram here: https://github.com/senaite/bika.lims/blob/senaite-integration/docs/resources/bika_sample_workflow.svg

Anyhow, these are the things that will definitely depend on the lab idiosyncrasy, so I suggest that once we have all permissions in place, the changes in permissions should be done in a lab-specific add-on.

<permission-role>LabManager</permission-role>
<permission-role>Manager</permission-role>
<permission-role>Sampler</permission-role>
Expand Down