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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user