-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Describe the bug/issue
When trying to add a new category with a user who has the category edit permission, I get the following error:
I was not able to get a PHP error from this.
When I try to edit a category name on the other hand, I get the following:
[Mon Aug 04 15:01:06.858135 2025] [php:notice] [pid 36702] [client 192.168.122.1:49332] [CRITICAL] Invalid permission code document_repository_upload#0 /var/www/loris/php/libraries/UserPermissions.class.inc(110): UserPermissions->_permissionTrueAndValid()\n#1 /var/www/loris/php/libraries/UserPermissions.class.inc(167): UserPermissions->hasPermission()\n#2 /var/www/loris/modules/document_repository/php/editcategory.class.inc(43): UserPermissions->hasAnyPermission()\n#3 /var/www/loris/project/libraries/Module.class.inc(308): LORIS\document_repository\EditCategory->_hasAccess()\n#4 /var/www/loris/src/Middleware/ResponseGenerator.php(51): Module->handle()\n#5 /var/www/loris/src/Middleware/AuthMiddleware.php(64): LORIS\Middleware\ResponseGenerator->process()\n#6 /var/www/loris/src/Router/ModuleRouter.php(75): LORIS\Middleware\AuthMiddleware->process()\n#7 /var/www/loris/src/Middleware/ExceptionHandlingMiddleware.php(55): LORIS\Router\ModuleRouter->handle()\n#8 /var/www/loris/src/Router/BaseRouter.php(127): LORIS\Middleware\ExceptionHandlingMiddleware->process()\n#9 /var/www/loris/src/Middleware/ResponseGenerator.php(51): LORIS\Router\BaseRouter->handle()\n#10 /var/www/loris/src/Middleware/AWS.php(35): LORIS\Middleware\ResponseGenerator->process()\n#11 /var/www/loris/src/Middleware/ContentLength.php(53): LORIS\Middleware\AWS->process()\n#12 /var/www/loris/htdocs/index.php(115): LORIS\Middleware\ContentLength->process()\n#13 {main}, referer: https://ibis-rc.loris.ca/document_repository/?
[Mon Aug 04 15:01:06.858481 2025] [php:warn] [pid 36702] [client 192.168.122.1:49332] PHP Warning: Undefined array key "From" in /var/www/loris/src/Http/Error.php on line 74, referer: https://ibis-rc.loris.ca/document_repository/?
This also means step 12 of the test plan could not be tested
Please include:
- Instrument/s (Specify instrument name and database name):
- Questions/Fields involved (If requesting edits or addition of fields, please include field type and options for field):
- Candidate/s affected (If applicable, list candidate with bug or issue to be resolved):
- Visit/s:
- Project/s (Sub-project/s if applicable):
- Screenshot (If available):
- URL of reported example/case:
To Reproduce
Steps to reproduce current behaviour (attach screenshots if applicable):
- Go to document repository with the permission to Edit/Upload/Delete Categories
- Try to upload a category
- See error
- Go to the "Edit category" page
- See error
Anticipated behaviour
To be able to add / edit categories.
Additional Information (If deemed useful)
Include additional information about the problem here.
Browser Environment (please complete the following information):
- OS:
- Browser: Chrome
- Version:
Related tickets:
- Issue Tracker (Original ticket if requested via Issue Tracker)
- Github (Related Issues/PRs)
- Redmine (Older tickets for additional context/background)
Please include appropriate labels and associated 'Projects' when creating the issue. Thanks!