Skip to content

Conversation

@HenriRabalais
Copy link
Collaborator

@HenriRabalais HenriRabalais commented Jul 26, 2018

This PR fixes the Statistics Site Permissions to allow access to Users with Access All Profiles Permission.

How to test:

  • Make a non-super-user test user and give them data entry permission.
  • Add and remove 'Across all sites access candidate profiles' permission and ensure that in both cases the Statistics Site page can be accessed from the dashboard's 'Incomplete Forms' link.
  • Remove 'Data Entry' Permission and ensure that the Statistics Site page cannot be viewed.

Refer to Dashboard TestPlan item 11 for further clarification:
https://github.com/aces/Loris/blob/20.0-release/modules/dashboard/test/TestPlan.md

Redmine Ticket:
https://redmine.cbrain.mcgill.ca/issues/14946

@HenriRabalais HenriRabalais changed the base branch from minor to 20.0-release July 26, 2018 17:37
$accessAllProfiles = $user->hasPermission('access_all_profiles') &&
$user->hasPermission('data_entry');
return $user->hasCenterPermission('data_entry', $centerID) ||
$accessAlProfiles;
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: $accessAllProfiles

@HenriRabalais HenriRabalais added the Critical to release PR or issue is key for the release to which it has been assigned label Jul 26, 2018
@HenriRabalais HenriRabalais added Category: Bug PR or issue that aims to report or fix a bug Beginner Friendly PR or Issue appears to be easy for someone to use to familiarize themselves with LORIS labels Jul 26, 2018
Copy link
Contributor

@zaliqarosli zaliqarosli left a comment

Choose a reason for hiding this comment

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

looks good!

@zaliqarosli zaliqarosli added the Passed manual tests PR has been successfully tested by at least one peer label Jul 26, 2018
@HenriRabalais HenriRabalais added Testing PR contains test plan or automated test code (or config files for Travis) and removed Testing PR contains test plan or automated test code (or config files for Travis) labels Jul 26, 2018
@miebeers miebeers self-requested a review July 26, 2018 19:23
Copy link
Contributor

@miebeers miebeers left a comment

Choose a reason for hiding this comment

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

Tested, and it works well for me too!

@ridz1208 ridz1208 added this to the 20.0.0 milestone Jul 27, 2018
@ridz1208 ridz1208 merged commit b76f6af into aces:20.0-release Aug 1, 2018
@HenriRabalais HenriRabalais deleted the fixedStatisticsPermissions branch August 2, 2018 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Beginner Friendly PR or Issue appears to be easy for someone to use to familiarize themselves with LORIS Category: Bug PR or issue that aims to report or fix a bug Critical to release PR or issue is key for the release to which it has been assigned Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants