[PR #5793] [MERGED] Permissions: Use of enum references and RolePermission cleanup #6569

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

📋 Pull Request Information

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

Base: developmentHead: role_permission_refactor


📝 Commits (6)

  • c8716df Permissions: Removed unused role-perm columns, added permission enum
  • 5fc11d4 Permissions: Added enum usage to controller helpers
  • 33a0237 Permissions: Updated usage of controller methods to use enum
  • 419dbad Permissions: Updated use of helpers to use enums
  • 573d692 Permissions: Fixed check method to allow enum usage
  • a70c733 Permissions: Cleanup after review of enum implementation PR

📊 Changes

106 files changed (+589 additions, -385 deletions)

View changed files

📝 app/Access/LoginService.php (+2 -1)
📝 app/Activity/Controllers/AuditLogApiController.php (+3 -2)
📝 app/Activity/Controllers/AuditLogController.php (+3 -2)
📝 app/Activity/Controllers/CommentController.php (+9 -8)
📝 app/Activity/Controllers/WatchController.php (+2 -1)
📝 app/Activity/Controllers/WebhookController.php (+2 -1)
📝 app/Activity/Notifications/Handlers/BaseNotificationHandler.php (+2 -1)
📝 app/Activity/Tools/CommentTree.php (+2 -1)
📝 app/Activity/Tools/TagClassGenerator.php (+3 -2)
📝 app/Activity/Tools/UserEntityWatchOptions.php (+2 -1)
📝 app/Api/ApiTokenGuard.php (+2 -1)
📝 app/Api/UserApiTokenController.php (+7 -6)
📝 app/App/helpers.php (+3 -2)
📝 app/Entities/Controllers/BookApiController.php (+4 -3)
📝 app/Entities/Controllers/BookController.php (+16 -15)
📝 app/Entities/Controllers/BookshelfApiController.php (+4 -3)
📝 app/Entities/Controllers/BookshelfController.php (+8 -7)
📝 app/Entities/Controllers/ChapterApiController.php (+5 -4)
📝 app/Entities/Controllers/ChapterController.php (+15 -17)
📝 app/Entities/Controllers/PageApiController.php (+5 -4)

...and 80 more files

📄 Description

Todo

  • Update existing usage of helpers in-app.

🔄 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/5793 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 9/8/2025 **Status:** ✅ Merged **Merged:** 9/10/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `role_permission_refactor` --- ### 📝 Commits (6) - [`c8716df`](https://github.com/BookStackApp/BookStack/commit/c8716df284e74fad780ed8d36b23669d725b164a) Permissions: Removed unused role-perm columns, added permission enum - [`5fc11d4`](https://github.com/BookStackApp/BookStack/commit/5fc11d46d5115b96a2571fa371671c26900fab8f) Permissions: Added enum usage to controller helpers - [`33a0237`](https://github.com/BookStackApp/BookStack/commit/33a0237f875170e4750ea537604307dd9d5a0bde) Permissions: Updated usage of controller methods to use enum - [`419dbad`](https://github.com/BookStackApp/BookStack/commit/419dbadcfd7176eec8c1e59ab0df92f054363c16) Permissions: Updated use of helpers to use enums - [`573d692`](https://github.com/BookStackApp/BookStack/commit/573d692a59d97f34e171a7d42527de36a5b8a014) Permissions: Fixed check method to allow enum usage - [`a70c733`](https://github.com/BookStackApp/BookStack/commit/a70c733f2757f8f145fb784b6306e116a4d54fc2) Permissions: Cleanup after review of enum implementation PR ### 📊 Changes **106 files changed** (+589 additions, -385 deletions) <details> <summary>View changed files</summary> 📝 `app/Access/LoginService.php` (+2 -1) 📝 `app/Activity/Controllers/AuditLogApiController.php` (+3 -2) 📝 `app/Activity/Controllers/AuditLogController.php` (+3 -2) 📝 `app/Activity/Controllers/CommentController.php` (+9 -8) 📝 `app/Activity/Controllers/WatchController.php` (+2 -1) 📝 `app/Activity/Controllers/WebhookController.php` (+2 -1) 📝 `app/Activity/Notifications/Handlers/BaseNotificationHandler.php` (+2 -1) 📝 `app/Activity/Tools/CommentTree.php` (+2 -1) 📝 `app/Activity/Tools/TagClassGenerator.php` (+3 -2) 📝 `app/Activity/Tools/UserEntityWatchOptions.php` (+2 -1) 📝 `app/Api/ApiTokenGuard.php` (+2 -1) 📝 `app/Api/UserApiTokenController.php` (+7 -6) 📝 `app/App/helpers.php` (+3 -2) 📝 `app/Entities/Controllers/BookApiController.php` (+4 -3) 📝 `app/Entities/Controllers/BookController.php` (+16 -15) 📝 `app/Entities/Controllers/BookshelfApiController.php` (+4 -3) 📝 `app/Entities/Controllers/BookshelfController.php` (+8 -7) 📝 `app/Entities/Controllers/ChapterApiController.php` (+5 -4) 📝 `app/Entities/Controllers/ChapterController.php` (+15 -17) 📝 `app/Entities/Controllers/PageApiController.php` (+5 -4) _...and 80 more files_ </details> ### 📄 Description ### Todo - Update existing usage of helpers in-app. --- <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:35:47 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6569