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

[Bug] Incorrect display error message when restricting access to an instrument #8171

Closed
paiva opened this issue Sep 22, 2022 · 1 comment
Closed
Assignees
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@paiva
Copy link
Contributor

paiva commented Sep 22, 2022

Describe the bug
An incorrect error message is displayed on the frontend when user does not have the permission to access an instrument.

Error on the log file:

[ERROR] You do not have access to this page.#0 /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc(312): NDB_BVL_Instrument->_hasAccess()\n#1 /var/www/loris/modules/instruments/php/module.class.inc(81): NDB_BVL_Instrument::factory()\n#2 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\\instruments\\Module->handle()\n#3 /var/www/loris/src/Middleware/AuthMiddleware.php(63): LORIS\\Middleware\\ResponseGenerator->process()\n#4 /var/www/loris/src/Router/ModuleRouter.php(74): LORIS\\Middleware\\AuthMiddleware->process()\n#5 /var/www/loris/src/Middleware/ExceptionHandlingMiddleware.php(55): LORIS\\Router\\ModuleRouter->handle()\n#6 /var/www/loris/src/Router/BaseRouter.php(126): LORIS\\Middleware\\ExceptionHandlingMiddleware->process()\n#7 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle()\n#8 /var/www/loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process()\n#9 /var/www/loris/htdocs/index.php(55): LORIS\\Middleware\\ContentLength->process()\n#10 {main}, referer: http://localhost:8080/instrument_list/?candID=965432&sessionID=8

Screenshot

Screen Shot 2022-09-21 at 3 53 51 PM

What did you expect to happen?
The message on the frontend should be "You do not have access to this page." as in the first part of the error log, but instead it says "Something went wrong." instead as shown in the screenshot

Browser Environment (please complete the following information):

  • Browser Firefox
  • Version 104.0.2

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

  • LORIS Version: 24.0
  • Linux distribution and Version: Ubuntu 18.04
  • MySQL/MariaDB Version: MySQL Ver 14.14 Distrib 5.7.39
@paiva paiva added the Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) label Sep 22, 2022
driusan pushed a commit that referenced this issue Jan 12, 2023
An incorrect error message was displayed on the frontend when a user did not have the permission to access an instrument.
The code was test looping on ALL permissions, but it failed when trying to do so on only ONE permission (the loop went through the instrument name and permission instead of the actual instruments objects).

Resolves #8171
zaliqarosli pushed a commit to zaliqarosli/Loris that referenced this issue Mar 6, 2023
An incorrect error message was displayed on the frontend when a user did not have the permission to access an instrument.
The code was test looping on ALL permissions, but it failed when trying to do so on only ONE permission (the loop went through the instrument name and permission instead of the actual instruments objects).

Resolves aces#8171
@christinerogers
Copy link
Contributor

@regisoc if this issue was resolved by #8284, could you close this issue? thanks

@regisoc regisoc closed this as completed Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

3 participants