]> BookStack Code Mirror - bookstack/commit
Refactored some core entity actions
authorDan Brown <redacted>
Thu, 19 Sep 2019 23:18:28 +0000 (00:18 +0100)
committerDan Brown <redacted>
Thu, 19 Sep 2019 23:18:28 +0000 (00:18 +0100)
commit8b550991a4dbcd7a05e08e8f600b5444d5f4004d
tree5cf0fe89800267635413dd138c79342db21a3a52
parentf7a5a0705bba304a705df74b1e7e724827900a0c
Refactored some core entity actions

- Created BookChild class to share some page/chapter logic.
- Gave entities the power to generate their own permissions and slugs.
- Moved bits out of BaseController constructor since it was overly
sticky.
- Moved slug generation logic into its own class.
- Created a facade for permissions due to high use.
- Fixed failing test issues from last commits
25 files changed:
app/Actions/ActivityService.php
app/Auth/Permissions/PermissionService.php
app/Config/app.php
app/Entities/BookChild.php [new file with mode: 0644]
app/Entities/Bookshelf.php
app/Entities/Chapter.php
app/Entities/Entity.php
app/Entities/Page.php
app/Entities/Repos/EntityRepo.php
app/Entities/Repos/PageRepo.php
app/Entities/SlugGenerator.php [new file with mode: 0644]
app/Facades/Permissions.php [new file with mode: 0644]
app/Http/Controllers/BookController.php
app/Http/Controllers/BookshelfController.php
app/Http/Controllers/ChapterController.php
app/Http/Controllers/Controller.php
app/Http/Controllers/HomeController.php
app/Http/Controllers/PageController.php
app/Http/Controllers/UserController.php
app/Providers/CustomFacadeProvider.php
phpunit.xml
routes/web.php
tests/Entity/PageDraftTest.php
tests/Entity/TagTest.php
tests/SharedTestHelpers.php