[PR #2436] [MERGED] Entity Ownership System #5996

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/2436
Author: @ssddanbrown
Created: 12/30/2020
Status: Merged
Merged: 1/2/2021
Merged by: @ssddanbrown

Base: masterHead: ownership_system


📝 Commits (10+)

  • b493bec Started change for entities to have concept of owners
  • 4c580d1 Added owners to entity creation and updated tests
  • e408067 Fixed test helper method signature
  • 33e35c9 Converted breadcrumb-listing to new component system
  • 8833b5b Added user-select input
  • da9083b Fixed view path
  • 99b1462 Moved permission updating to its own tool
  • 5e686bb Added user ownership migrate to delete screen.
  • b43f997 Added manual type conversion to fix failing tests
  • de989ff Tested new ownership + (delete/change) systems

📊 Changes

47 files changed (+678 additions, -281 deletions)

View changed files

📝 app/Actions/Comment.php (+8 -6)
📝 app/Auth/Permissions/PermissionService.php (+19 -19)
📝 app/Auth/UserRepo.php (+21 -1)
📝 app/Entities/EntityProvider.php (+1 -1)
📝 app/Entities/Models/Entity.php (+6 -2)
📝 app/Entities/Repos/BaseRepo.php (+2 -26)
📝 app/Entities/Repos/BookRepo.php (+0 -8)
📝 app/Entities/Repos/BookshelfRepo.php (+0 -8)
📝 app/Entities/Repos/ChapterRepo.php (+0 -8)
📝 app/Entities/Repos/PageRepo.php (+1 -8)
app/Entities/Tools/PermissionsUpdater.php (+68 -0)
📝 app/Http/Controllers/BookController.php (+3 -4)
📝 app/Http/Controllers/BookshelfController.php (+3 -7)
📝 app/Http/Controllers/ChapterController.php (+3 -4)
📝 app/Http/Controllers/Controller.php (+3 -2)
📝 app/Http/Controllers/PageController.php (+3 -4)
📝 app/Http/Controllers/UserController.php (+3 -2)
app/Http/Controllers/UserSearchController.php (+31 -0)
📝 app/Traits/HasCreatorAndUpdater.php (+5 -6)
app/Traits/HasOwner.php (+19 -0)

...and 27 more files

📄 Description

PR and branch for addition of tracking entity "Owners".

  • Update entity creation to set owned_by field.
  • Add control on permission pages.
  • Add control on user delete page.
  • Add testing to cover.

Closing #2246


🔄 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/2436 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 12/30/2020 **Status:** ✅ Merged **Merged:** 1/2/2021 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `ownership_system` --- ### 📝 Commits (10+) - [`b493bec`](https://github.com/BookStackApp/BookStack/commit/b493becadfd0acf177decb796b460f92ca56f4e1) Started change for entities to have concept of owners - [`4c580d1`](https://github.com/BookStackApp/BookStack/commit/4c580d1571958a2a8e2a32292f813628296ca215) Added owners to entity creation and updated tests - [`e408067`](https://github.com/BookStackApp/BookStack/commit/e408067b10c97362088806b00d06e968049fd5e4) Fixed test helper method signature - [`33e35c9`](https://github.com/BookStackApp/BookStack/commit/33e35c9a8af18e96abc54b2d5b553195c495d4df) Converted breadcrumb-listing to new component system - [`8833b5b`](https://github.com/BookStackApp/BookStack/commit/8833b5bc3bc717c0303fb1a61a15c97f10b283ae) Added user-select input - [`da9083b`](https://github.com/BookStackApp/BookStack/commit/da9083bf1fdbec85f661f579b56f4999f3493122) Fixed view path - [`99b1462`](https://github.com/BookStackApp/BookStack/commit/99b14621f9bb5f8f02a16a15beb7576a73b2f550) Moved permission updating to its own tool - [`5e686bb`](https://github.com/BookStackApp/BookStack/commit/5e686bb624daff355b34e80a92dada627b3a7cf8) Added user ownership migrate to delete screen. - [`b43f997`](https://github.com/BookStackApp/BookStack/commit/b43f997daba11dc276af320d702692ac32fc3257) Added manual type conversion to fix failing tests - [`de989ff`](https://github.com/BookStackApp/BookStack/commit/de989ffa9ad1d191d22e9ad42b94c277003b1e48) Tested new ownership + (delete/change) systems ### 📊 Changes **47 files changed** (+678 additions, -281 deletions) <details> <summary>View changed files</summary> 📝 `app/Actions/Comment.php` (+8 -6) 📝 `app/Auth/Permissions/PermissionService.php` (+19 -19) 📝 `app/Auth/UserRepo.php` (+21 -1) 📝 `app/Entities/EntityProvider.php` (+1 -1) 📝 `app/Entities/Models/Entity.php` (+6 -2) 📝 `app/Entities/Repos/BaseRepo.php` (+2 -26) 📝 `app/Entities/Repos/BookRepo.php` (+0 -8) 📝 `app/Entities/Repos/BookshelfRepo.php` (+0 -8) 📝 `app/Entities/Repos/ChapterRepo.php` (+0 -8) 📝 `app/Entities/Repos/PageRepo.php` (+1 -8) ➕ `app/Entities/Tools/PermissionsUpdater.php` (+68 -0) 📝 `app/Http/Controllers/BookController.php` (+3 -4) 📝 `app/Http/Controllers/BookshelfController.php` (+3 -7) 📝 `app/Http/Controllers/ChapterController.php` (+3 -4) 📝 `app/Http/Controllers/Controller.php` (+3 -2) 📝 `app/Http/Controllers/PageController.php` (+3 -4) 📝 `app/Http/Controllers/UserController.php` (+3 -2) ➕ `app/Http/Controllers/UserSearchController.php` (+31 -0) 📝 `app/Traits/HasCreatorAndUpdater.php` (+5 -6) ➕ `app/Traits/HasOwner.php` (+19 -0) _...and 27 more files_ </details> ### 📄 Description PR and branch for addition of tracking entity "Owners". - [x] Update entity creation to set `owned_by` field. - [x] Add control on permission pages. - [x] Add control on user delete page. - [x] Add testing to cover. --- Closing #2246 --- <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:22:08 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5996