/** @var Book $book */
foreach ($shelfBooks as $book) {
- if ($checkUserPermissions && !userCan(\BookStack\Permissions\Permission::RestrictionsManage, $book)) {
+ if ($checkUserPermissions && !userCan(Permission::RestrictionsManage, $book)) {
continue;
}
$book->permissions()->delete();