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

[mri_violations] Cannot access module with "Own sites" permission #9603

Open
CamilleBeau opened this issue Feb 21, 2025 · 0 comments
Open

[mri_violations] Cannot access module with "Own sites" permission #9603

CamilleBeau opened this issue Feb 21, 2025 · 0 comments
Assignees
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing Difficulty: Simple PR or issue that should be easy to implement, review, or test Module: mri_violations PR or issue related to mri_violations module Priority: High PR or issue should be prioritised over others for review and testing
Milestone

Comments

@CamilleBeau
Copy link
Contributor

Describe the bug
There is a 500 error when accessing the module with the "own sites" permission. This prevents testing several steps of the test-plan

o Uncaught TypeError: CenterID::singleton(): Argument #1 ($id) must be of type int, CenterID given, called in /var/www/Loris/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc on line 50 and defined in /var/www/Loris/php/libraries/CenterID.php:18\nStack trace:\n#0 /var/www/Loris/modules/mri_violations/php/usercentermatchornulloranypermission.class.inc(50): CenterID::singleton()\n#1 /var/www/Loris/src/Data/ProvisionerInstance.php(130): LORIS\mri_violations\UserCenterMatchOrNullOrAnyPermission->filter()\n#2 [internal function]: LORIS\Data\ProvisionerInstance->LORIS\Data\{closure}()\n#3 [internal function]: CallbackFilterIterator->accept()\n#4 [internal function]: FilterIterator->rewind()\n#5 /var/www/Loris/src/Data/Table.php(84): FilterIterator->rewind()\n#6 /var/www/Loris/src/Data/Table.php(99): LORIS\Data\Table->toArray()\n#7 /var/www/Loris/php/libraries/DataFrameworkMenu.class.inc(149): LORIS\Data\Table->toJSON()\n#8 /var/www/Loris/php/libraries/NDB_Menu_Filter.class.inc(645): DataFrameworkMenu->toJSON()\n#9 /var/www/Loris/php/libraries/NDB_Page.class.inc(749): NDB_Menu_Filter->display()\n#10 /var/www/Loris/php/libraries/DataFrameworkMenu.class.inc(204): NDB_Page->handle()\n#11 /var/www/Loris/modules/mri_violations/php/mri_violations.class.inc(129): DataFrameworkMenu->handle()\n#12 /var/www/Loris/php/libraries/NDB_Page.class.inc(726): LORIS\mri_violations\Mri_Violations->handle()\n#13 /var/www/Loris/php/libraries/DataFrameworkMenu.class.inc(186): NDB_Page->process()\n#14 /var/www/Loris/php/libraries/Module.class.inc(322): DataFrameworkMenu->process()\n#15 /var/www/Loris/src/Middleware/ResponseGenerator.php(51): Module->handle()\n#16 /var/www/Loris/src/Middleware/AuthMiddleware.php(64): LORIS\Middleware\ResponseGenerator->process()\n#17 /var/www/Loris/src/Router/ModuleRouter.php(75): LORIS\Middleware\AuthMiddleware->process()\n#18 /var/www/Loris/src/Middleware/ExceptionHandlingMiddleware.php(55): LORIS\Router\ModuleRouter->handle()\n#19 /var/www/Loris/src/Router/BaseRouter.php(138): LORIS\Middleware\ExceptionHandlingMiddleware->process()\n#20 /var/www/Loris/src/Middleware/ResponseGenerator.php(51): LORIS\Router\BaseRouter->handle()\n#21 /var/www/Loris/src/Middleware/ContentLength.php(53): LORIS\Middleware\ResponseGenerator->process()\n#22 /var/www/Loris/htdocs/index.php(74): LORIS\Middleware\ContentLength->process()\n#23 {main}\n thrown, referer: https://test-dev-270.loris.ca/mri_violations/?

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Give your user the "MRI Violated Scans: View Violated Scans - Own Sites" permission only
  2. Log in using that user and navigate to the mri violations module
  3. See error

What did you expect to happen?
The module to load with the own sites permission, and only show the relevant sites

Browser Environment (please complete the following information):

  • OS: [e.g. Plan9, HURD, Oberon, etc]
  • Browser [e.g. chrome, firefox] (note that only these two browsers are supported)
  • Version [e.g. 22]

Server Environment (if known):
Note: We only support the most recent release of LORIS.

  • LORIS Version: [e.g. 22.0.0]
  • Linux distribution and Version: [e.g. Ubuntu 16.04, CentOS 7]
  • MySQL/MariaDB Version: [e.g. MySQL 5.7, MariaDB 10.3]

Additional context
Add any other context about the problem here.

@CamilleBeau CamilleBeau added Module: mri_violations PR or issue related to mri_violations module 27.0.0 - Bugs Bugs Found in LORIS 27 testing labels Feb 21, 2025
@driusan driusan added Priority: High PR or issue should be prioritised over others for review and testing Difficulty: Simple PR or issue that should be easy to implement, review, or test labels Feb 24, 2025
@driusan driusan added this to the 27.0.0 milestone Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing Difficulty: Simple PR or issue that should be easy to implement, review, or test Module: mri_violations PR or issue related to mri_violations module Priority: High PR or issue should be prioritised over others for review and testing
Projects
None yet
Development

No branches or pull requests

3 participants