[Statistics / Behavioural Statistics / Double Data Entry Statistics] Fix permission issue where users were allowed to see the double data entry breakdown per participat from sites they don't have access to. #5966
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
Users were allowed to see the double data entry breakdown per participant from sites they don't have access to.
Brief summary of changes
The
_hasAccess
function was incorpoerate to this class (same functionality that the one in #5591)The function
_checkCriteria
was modified for only retrieve data from the sites(centers) the user have access to.Note: In future developments the capacity of setting permissions per site per user could be desirable. A note in rapport was included in the codeset. In this case the proposed function
_hasAccess
should be updated accordingly .Testing instructions (if applicable)
A user with permission 'data_entry' should be now able to access the 'breakdown per participant' for the double data entry page only for the sites it have access to.
Links to related PRs
#5950
#5591