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

[examiner] Adds permission check when adding examiner to site. #9188

Conversation

racostas
Copy link
Contributor

@racostas racostas commented Apr 2, 2024

Brief summary of changes

Permissions are check now before allowing to add examiner to site.
Before this PR, a user with only the permission Examiner: Add and Certify Examiners - Own Sites was able to add examiners to sites it don't belongs to. Now this feature is only granted to users with the corresponding level of permission.

Testing instructions (if applicable)

  1. With a user that only have the permission Examiner: Add and Certify Examiners - Own Sites try to create a new examiner in MainMenu->Clinical->Examinier
  2. When clicking the Add Examiner button the modal windows that opened should only list the sites the current user belongs to.
  3. See image as reference.
    image
  4. Only for the listed sites the current user should be able to add an examiner.

Link(s) to related issue(s)

@racostas racostas added the "Help! I don't understand Travis!" PR is having a beef with TRAVIS. Someone needs to help label Apr 2, 2024
lorisadmin added 5 commits April 2, 2024 05:41
…xaminer_to_site' of https://github.com/racostas/Loris into 2024_04_02_examiner_adds_permission_check_when_adding_examiner_to_site
…xaminer_to_site' of https://github.com/racostas/Loris into 2024_04_02_examiner_adds_permission_check_when_adding_examiner_to_site
…xaminer_to_site' of https://github.com/racostas/Loris into 2024_04_02_examiner_adds_permission_check_when_adding_examiner_to_site
@racostas racostas removed the "Help! I don't understand Travis!" PR is having a beef with TRAVIS. Someone needs to help label Apr 2, 2024
@sruthymathew123 sruthymathew123 self-assigned this Apr 18, 2024
@sruthymathew123 sruthymathew123 added the Passed Manual Tests PR has undergone proper testing by at least one peer label Apr 18, 2024
@sruthymathew123
Copy link
Contributor

@driusan Tested and looks good on my end.

returning Forbidden in place of Conflict, superuser not need to be checked in hasAnyPermission()
@racostas racostas force-pushed the 2024_04_02_examiner_adds_permission_check_when_adding_examiner_to_site branch from 77cd3ff to c13c615 Compare April 24, 2024 14:54
@racostas racostas requested a review from driusan April 24, 2024 15:29
@driusan driusan merged commit bff9931 into aces:main Apr 24, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Manual Tests PR has undergone proper testing by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[examiner] I was able to create an examiner for a site I don't belong to
3 participants