1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-10-25 06:37:36 +03:00

Permissions: Updated use of helpers to use enums

Also added middlware method to Permission enum to allow easier usage
with controller middleware.
This commit is contained in:
Dan Brown
2025-09-09 09:48:19 +01:00
parent 33a0237f87
commit 419dbadcfd
62 changed files with 165 additions and 145 deletions

View File

@@ -342,7 +342,7 @@ class PageController extends Controller
$this->showSuccessNotification(trans('entities.pages_delete_draft_success'));
if ($chapter && userCan('view', $chapter)) {
if ($chapter && userCan(\BookStack\Permissions\Permission::View, $chapter)) {
return redirect($chapter->getUrl());
}