Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the issue/feature this PR addresses
Lab Clerks don't have access to Analysis Request view when they click to the link displayed in AR list. The reason is that if the Analysis Request is received and not verified, the system redirects the user to the manage_results view from the AR, for which LabClerks do not have privileges. For achieving this, a workaround with a
check_edit
param in the request was used. With this Pull Request, the functionality is preserved, butcheck_edit
tweak has been removed and in the__call__
view ofAnalysisRequestView
the permissions and status of the AR are checked, so if the current user has no privileges to Edit(Field)Results, the default AR view will be displayed.Current behavior before PR
LabClerks cannot access to ARs because the system redirects them to AR's manage_results view
Desired behavior after PR is merged
LabClerks can access to AR view.
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.