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

[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

Conversation

racostas
Copy link
Contributor

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

…entry breakdown per participat from sites they don't have access to.
@johnsaigle johnsaigle added Category: Bug PR or issue that aims to report or fix a bug Category: Security PR or issue that aims to improve security labels Jan 29, 2020
@ridz1208
Copy link
Collaborator

@racostas I changed the base of this one to 23 as it is not exactly critical and it contains alot of code changes.

we will assign it to someone for testing accordingly

@ridz1208 ridz1208 changed the base branch from 22.0-release to 23.0-release May 28, 2020 21:48
@ridz1208
Copy link
Collaborator

@laemtl could you test and review this please ?

@laemtl laemtl self-requested a review June 1, 2020 16:56
@laemtl
Copy link
Contributor

laemtl commented Jun 1, 2020

Since 55c15d0, 0000-00-02-Menus.sql has been replaced by 0000-00-02-Modules.sql. This branch throws a 500 error because the table LorisMenu doesn't exist on my dev instance. I fixed this by manually sourcing 0000-00-02-Menus.sql, but wonder if LorisMenu/LorisMenuPermissions should still be present by default in Loris DB?

@laemtl laemtl added the Passed manual tests PR has been successfully tested by at least one peer label Jun 1, 2020
@laemtl laemtl removed the Passed manual tests PR has been successfully tested by at least one peer label Jun 1, 2020
@christinerogers
Copy link
Contributor

@laemtl what you're seeing is that it needs a serious rebase on the 23 branch. old code is interfering with just pulling the change itself. rebasing will clear that clutter.

@laemtl laemtl added the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Jun 1, 2020
@laemtl laemtl self-requested a review June 1, 2020 21:14
@laemtl
Copy link
Contributor

laemtl commented Jun 2, 2020

Rebased in PR #6659. This PR can be closed.

@ridz1208
Copy link
Collaborator

ridz1208 commented Jun 2, 2020

@laemtl

@ridz1208 ridz1208 closed this Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug Category: Security PR or issue that aims to improve security State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants