[PR #3632] [MERGED] Fixed failed permission checks due to non-loaded fields #6241

Closed
opened 2026-02-05 10:27:33 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3632
Author: @ssddanbrown
Created: 8/10/2022
Status: Merged
Merged: 8/10/2022
Merged by: @ssddanbrown

Base: developmentHead: ownable_permission_fix


📝 Commits (1)

  • 16eedc8 Fixed failed permission checks due to non-loaded fields

📊 Changes

6 files changed (+42 additions, -6 deletions)

View changed files

📝 app/Auth/Permissions/PermissionApplicator.php (+12 -1)
📝 app/Entities/Repos/BaseRepo.php (+1 -0)
📝 app/Entities/Repos/BookshelfRepo.php (+1 -1)
📝 app/Entities/Tools/SearchRunner.php (+1 -1)
📝 app/Http/Controllers/FavouriteController.php (+1 -1)
📝 tests/FavouriteTest.php (+26 -2)

📄 Description

Added additional exceptions to prevent such cases in the future, so that they are caught in dev ideally.
Added test case specifically for reported favourite scenario.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3632 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 8/10/2022 **Status:** ✅ Merged **Merged:** 8/10/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `ownable_permission_fix` --- ### 📝 Commits (1) - [`16eedc8`](https://github.com/BookStackApp/BookStack/commit/16eedc826492deba2aa7bda09cdbbc7cbad02308) Fixed failed permission checks due to non-loaded fields ### 📊 Changes **6 files changed** (+42 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `app/Auth/Permissions/PermissionApplicator.php` (+12 -1) 📝 `app/Entities/Repos/BaseRepo.php` (+1 -0) 📝 `app/Entities/Repos/BookshelfRepo.php` (+1 -1) 📝 `app/Entities/Tools/SearchRunner.php` (+1 -1) 📝 `app/Http/Controllers/FavouriteController.php` (+1 -1) 📝 `tests/FavouriteTest.php` (+26 -2) </details> ### 📄 Description Added additional exceptions to prevent such cases in the future, so that they are caught in dev ideally. Added test case specifically for reported favourite scenario. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:27:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6241