mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-18 14:21:05 +00:00
Merge pull request #3632 from BookStackApp/ownable_permission_fix
Fixed failed permission checks due to non-loaded fields
This commit is contained in:
commit
375abca1ee
6 changed files with 42 additions and 6 deletions
app/Http/Controllers
|
@ -87,7 +87,7 @@ class FavouriteController extends Controller
|
|||
|
||||
$modelInstance = $model->newQuery()
|
||||
->where('id', '=', $modelInfo['id'])
|
||||
->first(['id', 'name']);
|
||||
->first(['id', 'name', 'restricted', 'owned_by']);
|
||||
|
||||
$inaccessibleEntity = ($modelInstance instanceof Entity && !userCan('view', $modelInstance));
|
||||
if (is_null($modelInstance) || $inaccessibleEntity) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue